Im working on this program which is supposed to let you write in som players and then print them out on the screen but the problem is I can't seem to figure out where im going wrong, I managed to make a working program by using various vectors in my class but I wanted to do it with just one but I keep getting errors :(
You might consider creating a class called Players, where vector<Player>Pvec is a member of that class. In other words, Players contains a vector of player objects. player could just be a nested struct or class type within Players, containing the data that makes up a players.
In your program, getPlayer is trying to access Pvec which was created and destroyed within the setPlayer function.