#include <iostream>
#include <string>
#include <vector>
 
using namespace std;
 
class student {
public:
	int id;
	string name;
};
 
int main()
{
	student my_son;
	my_son.id = 1;
 
	vector<student> students;
 
	// add one
 
	students.push_back(my_son);
 
	for (auto stu : students) {
		cout << stu.id << " is " << stu.name << endl;
	}
 
 
	system("pause");
}
cs-142/simple-students.txt · Last modified: 2014/10/23 15:22 by kseppi
Back to top
CC Attribution-Share Alike 4.0 International
chimeric.de = chi`s home Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0