首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > C++ >

哪位高手来解释上先

2012-10-10 
谁来解释下先!#include iostream#include sstream#include stringusing namespace stdint main(){s

谁来解释下先!
#include <iostream> 
#include <sstream> 
#include <string> 
using namespace std; 

int main()  

stringstream ostr; 
  ostr<<"This is stringstream"; 
  string gstr = ostr.str(); 
  cout<<gstr<<endl; 
   
  char a; 
  ostr>>a; 
  cout<<a ;
cout<<endl;
  return 1;
   
}

[解决办法]
就是输入输出,没有啥好解释的!看他的操作符就很清楚了,
[解决办法]
就是教你如何使用stringstream对象进行字符串的输入输出的操作,以及和string对象的转换。

热点排行