ifndef; endif Statement?? Can someone explain what is the following code mean??

Flexline's Avatar, Join Date: Jan 2010
Newbie Member
/* Controller handle */
#if defined(__cplusplus)
extern "C" {
#endif
typedef struct _MPIControl *MPIControl;
#if defined(__cplusplus)
}
#endif
0
shabbir's Avatar, Join Date: Jul 2004
Go4Expert Founder
It means
Code:
#if defined(__cplusplus)
extern "C" {
#endif
If __cplusplus is defined I declare the statement extern "C" {

else

Code:
typedef struct _MPIControl *MPIControl;
Code:
#if defined(__cplusplus)
}
#endif
If __cplusplus is defined I close the braces I opened before.