编译命令 g++ 1.c 2.c
最主要的区别是:
1.CPP文件中的内容 (比较正常)
2.头文件中的内容 (区别与其他 头文件)
在函数声明时添加extern “C”,就可以在C中调用。为了同时可以在C++中调用,可以写成下面这样。
3.C文件中的内容 (与其他 c文件无不同)
编译命令 g++ 1.c 2.c
最主要的区别是:
1.CPP文件中的内容 (比较正常)
2.头文件中的内容 (区别与其他 头文件)
在函数声明时添加extern “C”,就可以在C中调用。为了同时可以在C++中调用,可以写成下面这样。
3.C文件中的内容 (与其他 c文件无不同)
上一篇:vs code 实用技巧
下一篇:c语言函数指针
C++之调用 C语言函数
函数调用
介绍了如何在C项目中调用C++项目的接口和库
举报文章
请选择举报类型
补充说明
0/200
上传截图
格式支持JPEG/PNG/JPG,图片不超过1.9M