#if 0

I found this in few .h files:
1
2
3
4
5
#if 0
#if something
#define something
#endif
#endif 

so what #if 0 does?
Some people use it to avoid the compilation of some part of code ( something similar to commenting the code out )

1
2
3
4
5
6
7
#if 0

     cout << "This won't be compiled so you won't see this line";

#endif

cout << "This would be compiled and executed so you will see this line";
Last edited on
Topic archived. No new replies allowed.