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.

原文链接: https://www.cnblogs.com/zhtf2014/archive/2010/11/20/1882619.html

欢迎关注

微信关注下方公众号,第一时间获取干货硬货;公众号内回复【pdf】免费获取数百本计算机经典书籍

    Name Control(Chapter 10 of Thinking in C++)

原创文章受到原创版权保护。转载请注明出处:https://www.ccppcoding.com/archives/17643

非原创文章文中已经注明原地址,如有侵权,联系删除

关注公众号【高性能架构探索】,第一时间获取最新文章

转载文章受原作者版权保护。转载请注明原作者出处!

(0)
上一篇 2023年2月7日 下午6:15
下一篇 2023年2月7日 下午6:16

相关推荐