摘要: 环境:vc2003.h 1 /********** 2 This library is free software; you can redistribute it and/or modify it under 3 the terms of the GNU Lesser General Public License as published by the 4 Free Software Foundation; either version 2.1 of the License, or (at your 5 option) any later version. (See .) 6 7 This. 阅读全文
posted @ 2013-08-13 17:32 CPYER 阅读(459) 评论(0) 推荐(0) 编辑
摘要: 简介:extern "C" 包含双重含义,从字面上即可得到:首先,被它修饰的目标是“extern”的;其次,被它修饰的目标是“C”的。让我们来详细解读这两重含义。含义:1.被extern限定的函数或变量是extern类型的: a.extern修饰变量的声明。举例来说,如果文件a.c需要引用b.c中变量 int v,就可以在a.c中声明extern int v,然后就可以引用变量v。这里需要注意的是,被引用的变量v的链接属性必须是外链接(external)的,也就是说a.c要引用到v,不只是取决于在a.c中声明extern int v,还取决于变量v本身是能够被引用到的。这涉 阅读全文
posted @ 2013-08-13 17:09 CPYER 阅读(1250) 评论(0) 推荐(1) 编辑