How to trigger the __cplusplus (C++) #ifdef?

Viewed 23901
#ifdef __cplusplus
// C++ code
#else
// C code
#endif

The structure is this. My question is, how to actually trigger the #ifdef on?

I mean, in program? What code I write can turn #ifdef on?

For example, in this case. is that

#define __cplusplus

will turn it on?

4 Answers
Related