7.6
来源:互联网 发布:python 时间戳加减 编辑:程序博客网 时间:2024/06/05 09:54
#include <iostream> #include <strstream> using namespace std; typedef struct student {int num; char name[20]; double score; }; int main() { student stud[3]={1234,"jiang",78,1123,"Wang",89.5,1234,"hu",90}, dstud1[3]; student stud1[3]; char c[50]; int i; ostrstream strout(c,50); for(i=0;i<3;i++) strout<<stud[i].num<<" "<<stud[i].name<<" "<<stud[i].score<<" "; strout<<ends; cout<<"array c:"<<endl<<c<<endl<<endl; istrstream strin(c,50); for(i=0;i<3;i++) strin>>stud1[i].num>>stud1[i].name>>stud1[i].score; cout<<"data from array c to array stud1:"<<endl; for(i=0;i<3;i++) cout<<stud1[i].num<<" "<<stud1[i].name<<" "<<stud1[i].score<<endl; cout<<endl; return 0; }
0 0
- 7.6
- 7.6
- 7.6
- 7.6
- 7.6
- 7.6
- 7.6
- 7.6
- 7.6随笔
- 7.6 泛型
- 7.6 7.7
- 7.6 调试
- 习题7.6
- 习题7.6
- sumary ~~~7.2-7.6
- 第七章 问题7.6
- 7.6. Protecting a Host
- 期待Mesa-7.6.1
- 无线承载网络和网络连接共享的流程
- android基于类装载器DexClassloader设计“插件框架”
- Wildcard Matching
- linux netstat 统计查看外部连接数
- javascript eval函数解析json数据时为什么 加上圆括号
- 7.6
- 筛选器异常处理
- poj3038解题报告
- Android中的类装载器DexClassLoader
- Pub/Sub 发布订阅
- 百个前端设计常用Javascript语句
- linux并发连接数查看
- oracle 数据导入导出 之expdp impdp
- 浅谈C++中内存分配、函数调用和返回值问题