字符串流的简单实例
摘要:
/*在一个字符数组c中存放10个整数,以空格相间隔,
要求将它们放到整型数组,在按大小排序,然后存放回字符数组c中。
*/
#include<iostream>
#include<strstream>
using namespace std;
int main()
{ char c[50]="12 34 65 -23 -32 33 61 99 321 32"; int a[10],i,j,t; cout<<"arrat c:"<<c<<endl; //显示字符数组中的字符串 istrstream 阅读全文
posted @ 2011-11-27 21:42 1.曲待续 阅读(480) 评论(0) 推荐(1) 编辑