您的位置:首页 > 编程语言 > C语言/C++

C++ stringstream 使用方法与例子

2017-02-07 00:00 477 查看
#include <iostream >
#include <sstream >
#include <string >
using namespace std;
int main() {
stringstream ostr("ccc");
ostr.put('d');
ostr.put('e');
ostr << "fg";
string gstr = ostr.str();
cout << gstr << endl;
char a;
ostr >> a;
cout << a system("pause");
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  sstream stringstream