Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

#ifdef question

Status
Not open for further replies.

bitwise

Programmer
Mar 15, 2001
269
0
0
US
In a lot of C programs in the header files I see this:

#ifdef __cplusplus
extern "C" {
#endif

...

#ifdef __cplusplus
}
#endif

What exactly is this doing?

Thanks,
bitwise
 
In C++ the type control is severe. Also C++ mangle function names. Code declared with extern "C" can't be averloaded. Also a lot of problems what appear if you use C functions in C++ disappear. For example function realloc. John Fill
1c.bmp


ivfmd@mail.md
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top