Forgive me if the title was even worded properly. What I'm trying to accomplish is to be able to create an unlimited number of objects for use by struct and quickly realizing that my thought process on how to achieve that is wrong. Here's the related code:
struct person {
string first;
string last;
string addr;
string phone;
};
int main (){
vector<int> pnum;
tmp = pnum.size();
pnum.push_back(tmp);
AddPerson(&pnum[tmp]); // <-- This has a problem in compiling
}
It feels like a vector/array is probably not what I should be doing, is there a smarter way to go about creating dynamic objects that I can group or manage logically?