2012年7月31日
摘要: vector::assign()用法: 1 #include "stdafx.h" 2 #include <iostream> 3 #include <vector> 4 using namespace std; 5 6 int _tmain(int argc, _TCHAR* argv[]) 7 { 8 int num[]={1,2,3,4,5}; 9 vector<int> vec1(num,num+sizeof(num)/sizeof(int));10 ostream_iterator<int> output(cout, 阅读全文
posted @ 2012-07-31 16:56 萧敬 阅读(115) 评论(0) 推荐(0) 编辑
2012年7月25日
摘要: struct student{ char name[20]; int age; float FS;};void cio(int n){ student *ps=new student[n]; for(int i=0;i<n;i++) { cout<<"请输入姓名 "<<endl; cin.getline(ps[i].name,20); cout<<"请输入年龄 "<<endl; cin>>ps[i].age; cout<<"请输入总分 "<<en 阅读全文
posted @ 2012-07-25 18:37 萧敬 阅读(229) 评论(0) 推荐(0) 编辑