Vector of Structs Question
Say i have a vector of structs
Code:
struct Crap{
int number;
int name;
}
and in main i have this vector
Now ive called this to a function that wants to look through this vector of structs. Say i got to the 3rd vector which lets say had
a number of 10 and a name of john. How do i delete this vector.
I've seen pop_back() and erase() but i havent seen it used for a vector of structs and the syntax is diff because you have to do things like
ca.name to access specific parts of the stuct of elements.
I'm doing this for a program im writing but b/c of my code i hope this example explains what i mean.