繁体   English   中英

我已经包含了string.h但是当我尝试使用它时,如下所示我得到错误

[英]I have included string.h but when i try to use it as in the following i get errors

我已经包含了string.h但是当我尝试使用它时,如下所示我得到错误

#include<string.h>
std::string something;

这里std会被标记,它会说**错误C2039:'string':不是'std'的成员**

但在我的程序的其他部分它工作,只在某些地方我确实得到这个错误

std :: string的正确头文件是string ,而不是string.h

C中不存在std::string dos。可能你想使用C ++。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM