Name Control(Chapter 10 of Thinking in C++)
转载 The escape mechanism provided in C++ is the alternate linkage specification, which was produced in the language by overloading the extern keyword. The extern is followed by a string that specifies the linkage you want for the declaration, followed by the declaration:
extern "C" float f(int a, char b);
This tells the compiler to give C linkage to f( ) so that the compiler doesn’t decorate the name. The only two types of linkage specifications supported by the standard are “C” and “C++,” but compiler vendors have the option of supporting other languages in the same way.
本文章为转载内容,我们尊重原作者对文章享有的著作权。如有内容错误或侵权问题,欢迎原作者联系我们进行内容更正或删除文章。
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
Operator Overloading part 2(Chapter 12 of Thinking in C++)
[代码]
C++ #include ios 学习 -
Function Overloading & Default Arguments(Chapter 7 of Thinking in C++)
Mem.hCode highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--1#ifndefMEM_H2#defineMEM_H3typedefunsignedcharbyte;45classMem6{7byte*mem;8intsize;9voidensureMinS...
C++ #include ios #define #ifndef