Why do we use extern "C" in C++ code?
Answers
Answered by
0
C++ allows function overloading, which means the linker needs to mangle the function name to indicate which specific prototype it needs to call. By declaring a function with extern "C" , it changes the linkage requirements so that the C++ compiler does not add the extra mangling information to the symbol.
Similar questions