std::vector<Game*> games;
I have the following setter:
void Instructor::setGames(const std::vector<Game *> &value)
{
games = value;
}
And I am trying to use it like this:
Game g1, g2, g3;
std::vector <Game> gameSet;
gameSet.push_back(g1);
gameSet.push_back(g2);
gameSet.push_back(g3);
i.setGames(&gameSet);
But I keep getting this error:
error: no matching function for call to ‘Instructor::setGames(std::vector<Game>*)’
i.setGames(&gameSet);
This doesn't work either.
i.setGames(gameSet);
What am I doing wrong? I want to fix this without changing the std::vector<Game*> games;