About 19,100,000 results
Open links in new tab
  1. Array format for #define (C preprocessor) - Stack Overflow

    Array format for #define (C preprocessor) Asked 13 years, 1 month ago Modified 4 years, 8 months ago Viewed 97k times

  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 define constants in Visual C# like #define in C?

    In C you can define constants like this #define NUMBER 9 so that wherever NUMBER appears in the program it is replaced with 9. But Visual C# doesn't do this. How is it done?

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

    #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 …

  5. What is the difference between #define and const? [duplicate]

    The #define directive is a preprocessor directive; the preprocessor replaces those macros by their body before the compiler even sees it. Think of it as an automatic search and replace of your …

  6. How do I show the value of a #define at compile-time?

    I know that this is a long time after the original query, but this may still be useful. This can be done in GCC using the stringify operator "#", but it requires two additional stages to be defined first. …

  7. #define macro for debug printing in C? - Stack Overflow

    #ifdef DEBUG #define DEBUG_TEST 1 #else #define DEBUG_TEST 0 #endif And then use DEBUG_TEST where I used DEBUG. If you insist on a string literal for the format string …

  8. Static, define, and const in C - Stack Overflow

    2 #define is a preprocessor operation and will cause all occurrences of m to be replaced by 30000 before the compilation phase happens. The other two examples are bona fide variables. The …

  9. Is it possible to use a if statement inside #define?

    As far as I know, what you're trying to do (use if statement and then return a value from a macro) isn't possible in ISO C... but it is somewhat possible with statement expressions (GNU …

  10. Why are #ifndef and #define used in C++ header files?

    I have been seeing code like this usually in the start of header files: #ifndef HEADERFILE_H #define HEADERFILE_H And at the end of the file is #endif What is the purpose of this?