i hope this question can be asked here
C / C++ / MFC
3
Posts
3
Posters
0
Views
1
Watching
-
Can u pls tell me what happens if we ignore the token name in the macro ex: #define dfg Thanks in advance.
-
Can u pls tell me what happens if we ignore the token name in the macro ex: #define dfg Thanks in advance.
It means that you've created a definition without a value. This would be used, for example, as a check if a piece of code has been compiled before, the common example is inclusion guards like #ifndef blah #define blah class blah { } #endif This will compile blah the first time, and the #ifndef will fail every other time, as blah has been #defined
Christian Graus - C++ MVP 'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert