I have a vector
with a bunch of People structs
inside of it. These People structs
have information about the individual person. It's basically a huge tree. It would look like this if it were drawn out:
Joe Bob
/ \ / \
Age Weight Age Weight
| | | |
14 140 22 160
The people at the top are structs
, and they are stored inside of a vector<People>
. However, these people are generated while the program runs.
I can have the program generate the name (like "Bob"), but how can I create a new instance of the People struct
that way?
This is similar to Automatically generate struct instances but that doesn't have an answer that works.