a vector of structs 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;