摘要:
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, 阅读全文
摘要:
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 阅读全文