About 11,000,000 results
Open links in new tab
  1. What is the difference between #define and const? [duplicate]

    The difference is that #define is processed by the preprocessor doing what amounts to simple text replacement. Const values defined like this are not visible for the actual compiler, while a variable …

  2. MSBuild: set a specific preprocessor #define in the command line

    Our solution was to use an environment variable with /D defines in it, combined with the Additional Options box in Visual Studio. In Visual Studio, add an environment variable macro, …

  3. How to declare variable and use it in the same Oracle SQL script?

    I want to write reusable code and need to declare some variables at the beginning and reuse them in the script, such as: DEFINE stupidvar = 'stupidvarcontent'; SELECT stupiddata FROM stupidtable ...

  4. c preprocessor - Is there a good reason for always enclosing a define ...

    #define _add_penguin(a) penguin ## a #define add_penguin(a) _add_penguin(a) #define WIDTH (100) #define HEIGHT 200 add_penguin(HEIGHT) // expands to penguin200 add_penguin(WIDTH) // …

  5. Why do most C developers use define instead of const?

    Mar 4, 2017 · #define simply substitutes a name with its value. Furthermore, a #define 'd constant may be used in the preprocessor: you can use it with #ifdef to do conditional compilation based on its …

  6. What is the purpose of the #define directive in C++?

    May 10, 2010 · #define to define numerical constants can be easily replaced by a const "variable", that, as a #define, doesn't really exist in the compiled executable. AFAIK it can be used in almost all the …

  7. error Please #define _AFXDLL or do not use /MD [d] occurs even after ...

    Jul 30, 2014 · Why don't you just do what it says and #define _AFXDLL? C/C++, Preprocessor, Preprocessor Definitions setting.

  8. How do I define a function with optional arguments?

    How do I define a function with optional arguments? Asked 13 years, 8 months ago Modified 1 year, 4 months ago Viewed 1.2m times

  9. c# - How do you use #define? - Stack Overflow

    Oct 30, 2013 · 8 #define is used to define compile-time constants that you can use with #if to include or exclude bits of code.

  10. What is the scope of a #define? - Stack Overflow

    Jul 6, 2016 · What is the scope of a #define? I have a question regarding the scope of a #define for C/C++ and am trying to bet understand the preprocessor. Let's say I have a project containing …