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

Newbie Member
29Jan2010,01:24   #1
Flexline's Avatar
/* Controller handle */
#if defined(__cplusplus)
extern "C" {
#endif
typedef struct _MPIControl *MPIControl;
#if defined(__cplusplus)
}
#endif
Go4Expert Founder
29Jan2010,11:03   #2
shabbir's Avatar
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.