I have the struct below
How can i push into a vector within that struct?
struct DNA
{
vector <string>header;
string DNAstrand;
double gc;
int valid;
};
struct World
{
// int numCountries;
DNA dnas[MAX_DNA_SIZE];
} myWorld;
I wish to push a string lets say the string variable is line into the vector called header in my dna struct.
How would i go about doing so?
I know that if i wish to add an element into the DNAstand i would just use myWorld.dnas[counter].DNAstrand = line But how does this work when i have a vector in there?