请问在VC中怎么使用string类,给个简单的例子好吗? #include <string.h>void main(){ string s="xxxxxx"; ......但是编译不了啊 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 stl的头文件一般没有.h应该是#include <string>using namespace std;... #include <string.h>改为#include <string>using namespace std; 用标准C++~#include <string>using namespace std; VC里有string类吗?应该是CString类吧! #include <string>#include <iostream>using namespace std;void main(){ string s("LLM"); cout<<s;} 还可以#include <string>void main(){ std::string s="xxxxxx"; ......} MFC如何获得本机局域IP 窗口不显示问题 关于读取ini文件的问题 连接ORACLE字符串的写法 视图中,拖动图像闪烁问题 htonl问题. 绘制MDI客户视?在线等! 任务栏上的程序的图标叫什么20,如何去掉80 高分请教关于bmp 图像无损缩小源码 LINUX下的MAKEFILE怎么写呀 救命啊,Help me! 前辈们! 有一个很有意思的问题,高手请进!
using namespace std;...
改为
#include <string>
using namespace std;
using namespace std;
应该是CString类吧!
#include <iostream>
using namespace std;
void main()
{
string s("LLM");
cout<<s;
}
#include <string>
void main()
{
std::string s="xxxxxx";
......
}