I can not understand how #define works. I only understand that when checking with #if will execute or not execute the code, depending on whether #define previously written, well, but the question is this, when compiling these lines in which:

  #if TEXT ... #endif 

Are they being cleaned or is it still checked as with simple if() ?

  • Without a trace are removed. The search and processing of such directives is a separate step that is carried out before the program text is transmitted to the compiler. - ߊߚߤߘ pm
  • that is, when disassembling, the code that hit the inactive #define will not be visible? - k0vpack
  • Yes, as if this code was not in the c / cpp / h-file at all. - ߊߚߤߘ 3:04 pm
  • Wow, I was talking about s-sharp - k0vpack
  • ... / cs file. This is a preprocessor, it works the same everywhere - in front of the compiler and is transparent to it. - янв

0