visual C声明一个字符串数组
发布时间:2020-12-16 06:45:14 所属栏目:百科 来源:网络整理
导读:我想使用非托管C. 以下代码: #include"string.h"std::string nodename[100]; 给我以下编译错误: ‘std’ : is not a class or namespace name 解决方法 您正在使用错误的头文件.你应该#includeing string而不是“string.h”: string是定义C STL类std :: s
我想使用非托管C.
以下代码: #include"string.h" std::string nodename[100]; 给我以下编译错误:
解决方法
您正在使用错误的头文件.你应该#includeing< string>而不是“string.h”:
>< string>是定义C STL类std :: string的头文件 对于像这样的系统头文件,您应始终使用尖括号#include它们,而不是双引号. (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |