//关于使用string#include#include "string"using namespace std; //定义 void StrDefine(){ string str; cout << str << str.empty() << endl;//STL中包含了函数名重载. string str1(5,'a');//赋值字符串5个a cout << str1 <<" "< <
本文共 308 字,大约阅读时间需要 1 分钟。
//关于使用string#include#include "string"using namespace std; //定义 void StrDefine(){ string str; cout << str << str.empty() << endl;//STL中包含了函数名重载. string str1(5,'a');//赋值字符串5个a cout << str1 <<" "< <
转载于:https://www.cnblogs.com/666fengmo666/p/7647527.html