c++ vector in struct code example
Example: how to store a struct in vector in c++
struct subject
{
string name;
int marks;
int credits;
};
vector<subject> sub;
struct subject
{
string name;
int marks;
int credits;
};
vector<subject> sub;