Here's is what I have. I'm not sure of how to create a new vector containing pointers to people.
Create a new vector containing pointers to people.Code:void FilterByBirthMonth( vector<Person*> &people ) { int month = 2; for(size_t i = 0; i < people.size();i++) { if(people[i]->birthDay.getMonth() == month) { //need new vector here } } }
Loop through the existing people vector and, if the person in the vector
has the birth month specified by the user, add the person to the new
vector.