Converting string vector into custom object vector
So I have a string vector values but I want to convert this vector into a
vector of type Game, which is my own custom class. How would I go about
this?
I'm trying something like this:
void set_games(vector <string> values){
vector <Game> tmp(values.begin(), values.end());
games = tmp;
}
but it's not working. Any suggestions?
No comments:
Post a Comment