我的这个为什么不对呀,明明就有定义啊!不明白,求指点,头文件也包括了呀
你这是c程序?
C语言中没有string类型。 string类型是 C++标准库中的,而且看你写的ss.length等,都是c++的写法,C语言不允许
#include <iostream>
using namespace std;
std::string
是C++标准库里的string
,你这是C程序,用不了,只能用字符数组来定义字符串。
c++支持c,c不一定支持c++
我看你是.cpp文件,可以加上
#include <iostream>
#include <string.h>
using namespace std;
string就能用了