首页 > 学院 > 开发设计 > 正文

stringstream 函数

2019-11-08 01:44:07
字体:
来源:转载
供稿:网友
#include<iostream>#include<string>#include<sstream>using namespace std;int main(){   istringstream str("1 234");   cout<<str.str()<<endl;   int a,b;   str>>a;   cout<<a<<endl;   str>>b;   cout<<b<<endl; }运行结果:1 234                    1    234 
上一篇:Task2相关总结

下一篇:文章标题

发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表