int a[4]={1,3,3,2};vector<int>v(a,a+4);try{v.at(100)=10; //改成v[100]=10;不会抛掷错误cout << v.size()<<endl;}catch( out_of_range e){cout << e.what() << endl;} 查看完整描述