I am trying to use the vector m_Gamers declared in the private class using FindorInsert to compare strings. Is that even possible? Is there another way of using it, maybe doing a copy?. I'm sorry if this is a noob question, i'm quite knew to this. any help is appreciated :) thank you
1 2 3 4 5 6 7
private:
std::vector<Gamer> m_Gamers;
int FindorInsert(const std::string& name);
In C++ File:
int FindorInsert(const std::string& name){
here I try to access m_Gamers to compare with name but i can't
}
In that "In C++ File" you need to properly scope that function as a member of the class. What you've shown is a global (non-class function) not a class member function.