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 Chriss Miller 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
Joined
Mar 15, 2001
Messages
269
Location
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.

Similar threads

  • Locked
  • Question Question
Replies
4
Views
469
Replies
2
Views
401
Replies
1
Views
293
  • Locked
  • Question Question
Replies
4
Views
334

Part and Inventory Search

Sponsor

Back
Top