what is the use of #ifndef and #define

what is the use of #ifndef , #define and #endif ??

can anybody tell me with example??


closed account (E0p9LyTq)
http://en.cppreference.com/w/cpp/preprocessor/conditional
#ifndef, #define and #endif are often used in combination to implement so called include guards to avoid that the content of a header file is included more than once in the same translation unit.

https://en.wikipedia.org/wiki/Include_guard
Topic archived. No new replies allowed.