I have 2 classes. The first one has in it a getfunction which returns a name
and I am trying to call that function from the second class. The first class
name is PlayerInfo and the getfunction is:
1 2 3 4
string getName()
{
return name;
}
And I call that function from the second class with:
cout<<PlayerInfo::getName()<<endl;
but it does not output anything. Is there something I am doing wrong?
And I would get an error at first that said I had to have an
object declared but I don't get an error anymore since I have made the
second class a child class of PlayerInfo.