I have a question about Pre-processor directives in c++:
For example:
#ifndef QUESTION //some code here #ifndef QUESTION //some code here #endif
Yes, we can. The #endif statement matches to the previous #if #ifdef or #ifndef etc for which there hasn't been a corresponding #endif.
#endif
#if
#ifdef
#ifndef
e.g.
#if ----------| #if -----| | #endif ---| | #endif --------|