IT Nursery
I have two macros FOO2 and FOO3: #define FOO2(x,y) ... #define FOO3(x,y,z) ... I want to define a new macro FOO as follows: #define FOO(x,y) FOO2(x,y) #define FOO(x,y,z) FOO3(x,y,z)...
  • May 26, 2022
  • 0 Comments
Trying to create a macro which can be used for print debug messages when DEBUG is defined, like the following pseudo code: #define DEBUG 1 #define debug_print(args ...) if...
  • May 23, 2022
  • 0 Comments
I need my code to do different things based on the operating system on which it gets compiled. I’m looking for something like this: #ifdef OSisWindows // do Windows-specific...
  • May 20, 2022
  • 0 Comments
I was wondering if someone could explain to me what the #pragma pack preprocessor statement does, and more importantly, why one would want to use it. I checked out...
  • May 20, 2022
  • 0 Comments
Is there a way for gcc/g++ to dump its preprocessor defines from the command line? I mean things like __GNUC__, __STDC__, and so on. 6 Answers 6
  • May 18, 2022
  • 0 Comments