I have to add a new item to the existing object vector.
Although I am aware that an iterator must be used, I am not entirely sure how it operates.
I need to insert a new item by name in the precise index that I found after some searching into an alphabetically sorted vector.
I have this, then.
vector<Person>people;
int index =54;
Person temp;
people.push_back(temp);//insert at end of ...READ MORE
Aug 5, 2022
in C++
by
Nicholas
• 7,760 points
•
687 views