热门

最新

红包

立Flag

投票

同城

我的

发布
weixin_43097956
数据plus
3 年前
trueweixin_43097956

茶叶老板的假期

CSDN App 扫码分享
分享
评论
1
打赏
  • 复制链接
  • 举报
下一条:
#include<iostream>using namespace std;#include<vector>#include<deque>void Score(vector<double>& v){ v.reserve(5); cout << "请分别为五位选手打分" << endl; cout << "A的得分:" << endl; cin >> v[0]; cout << "B的得分:" << endl; cin >> v[1]; cout << "C的得分:" << endl; cin >> v[2]; cout << "D的得分:" << endl; cin >> v[3]; cout << "E的得分:" << endl; cin >> v[4];}void test01(){ vector<vector<double>> v; v.reserve(10); vector<double> v1, v2, v3, v4, v5, v6, v7, v8, v9, v10; v.push_back(v1); v.push_back(v2); v.push_back(v3); v.push_back(v4); v.push_back(v5); v.push_back(v6); v.push_back(v7); v.push_back(v8); v.push_back(v9); v.push_back(v10); int num = 1; for (vector<vector<double>>::iterator it = v.begin();it != v.end();it++) { Score(*it); cout << "第" << num << "为选手的得分为:"; for (vector<double>::iterator it_ = it->begin(); it_ != it->end(); it_++) { cout << *it_; } cout << endl; num++; }}int main(){ test01(); system("pause"); return 0;}大佬们 这段代码为什么会报错啊
立即登录