Name Mangling

Description

  • Also known as: linkage conventions, linkage specification.
  • Specifies that C++ functions should use the C linkage convention, which allows C++ functions to be called from C code.
  • A function linked in this manner, cannot have overloaded operators - the name decorators that distinguish one overloaded function from another are not used.

Declaring a single function

extern "C" void MyFunction();

Declaring multiple functions

extern "C" {
      void FirstFunction();
      void SecondFunction();
}

Keywords

  • extern "C", __cdecl, __stdcall, __fastcall, __cplusplus