64,652
社区成员
发帖
与我相关
我的任务
分享
bool subject::ReadAll(std::vector<double>& temp) // 读取全部科目的数据
{
using namespace std;
if(head == NULL && 0 == (head -> score).size()) return false;
int i;
double t;
for ( fence = head; fence != NULL; fence = fence -> next) // 多个科目
{
for (i = 0; i < num; i++) // 给num个参赛者同一科目的分数按顺序存入
{
t = (fence -> score[i]);
temp.push_back(t);
//
cout << "\nReadAll是否有问题 " << fence -> score[i] << "t " << t << " "
<< "push_back是否成功." << temp[i];
//
}
}
return true;
}
bool subject::ReadAll(std::vector<double>& temp) // 读取全部科目的数据
{
using namespace std;
if(head == NULL && 0 == (head -> score).size()) return false;
int i;
int j = 0;
double t;
for ( fence = head; fence != NULL; fence = fence -> next) // 多个科目
{
for (i = 0; i < num; i++) // 给num个参赛者同一科目的分数按顺序存入
{
t = (fence -> score[i]);
temp.push_back(t);
//
cout << "\nReadAll是否有问题 " << fence -> score[i] << "t " << t << " "
<< "push_back是否成功." << temp[j];
j++;
//
}
}
return true;
}