cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Beginners
what is the use of #ifndef and #define
what is the use of #ifndef and #define
May 28, 2017 at 5:37am UTC
rajhansk
(66)
what is the use of #ifndef , #define and #endif ??
can anybody tell me with example??
May 28, 2017 at 5:39am UTC
closed account (
E0p9LyTq
)
http://en.cppreference.com/w/cpp/preprocessor/conditional
May 28, 2017 at 8:19am UTC
Peter87
(11238)
#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.