
string
wusoule
这个作者很懒,什么都没留下…
展开
-
string与string头文件
先来段代码。我是在vs2012上实验的:// priority_queue.cpp : Defines the entry point for the console application.//#include "stdafx.h"#include //#include //#include using namespace std;int _tmain(int argc,原创 2013-05-05 17:32:04 · 2447 阅读 · 0 评论 -
c++ 把文件转换成string
fstream fs;string line,str;fs.open("D::\\txt");if (!fs) { cout << "cannot open the file" << endl; return -1;}while (getline(fs, line)) { line += '\n'; str += line;}原创 2013-05-21 12:17:49 · 3274 阅读 · 1 评论