![]() |
Chapter 7 | ![]() |
Bleh right? Either use a C++ style comment and hope it works (//) for each line, or put in multiple pairs of our standard C-style comment. Well, MSVC has a comment that does what you want - use standard C-style comment opener, and close it with the super comment, which looks like this; /**/
For example:
void main(void) { printf("Hi!\n"); /* // printf("I hate this code!\n"); printf("Hurrah the code works!\n"); /**/ }Will end up printing out only 'Hi!'.
I use this on a daily basis to isolate bits of code quickly, and without resorting to preprocessor defines, or annoying standard c++ style comments.
![]() |
Index | ![]() |
7.1.4 Abara-Ka-Pragma | 7.2 Starting the MSVC Debugger |