所以,我有这个使用STL列表的程序:
#include "stdafx.h"
#include <iostream>
#include <list>
#include <algorithm>
using namespace std;
const int numberOfStudents = 3;
struct StudentInfo {
string name;
int grade;
};
void populateStudentRecords(list<StudentInfo>Students,list<int>::iterator iter){
}
int _tmain(int argc, _TCHAR* argv[])
{
list<StudentInfo>Records;
list<int>::iterator iter;
return 0;
}
我的问题是如何填充具有StudentInfo数据结构的列表作为类型,其中结构具有字符串名称和整数等级?如何为列表中的每个结构实例更改这两个变量?
答案 0 :(得分:1)
onebooking