发布网友 发布时间:2022-04-21 15:27
共2个回答
热心网友 时间:2023-09-10 20:20
C语言中 char*字符串相关的 在string.h中
C++里面, string类相关的,在string.h中
而char*字符串操作相关的,在cstring中。
热心网友 时间:2023-09-10 20:20
//如果你说的是stl的string类,那应该是这个
#include<string>
//使用时需要加std前缀或者打开命名空间
std::string a = "1234"
// 或者
using namespace std;
using std::string;