Original Post
error C2039: 'GetClassNameA' : is not a member of 'CPlayer' ok i have a CParty class that looks kinda like this and a CPlayer class that looks kinda like this ok now the actual error is comming from another file with this line in it. NOTE: m_party is a pointer an instance of class CParty. notice how i make a call to CPlayer::GetClassName(), but in the error report the function name is a little bit fudged to GetClassNameA instead of GetClassName.
class CParty
{
CPlayer* m_player[4];
public:
CPlayer* GetPlayer(Uint8 index)
{
return m_player[index];
}
};
class CPlayer
{
Uint8 m_class;
public:
char* GetClassName()
{
static const char className[6][8] =
{
"ClName1",
"ClName2",
"ClName3",
"ClName4",
"ClName5",
"ClName6"
};
return (char*)className[m_class];
}
};
m_font->print(screen, m_party->GetPlayer(0)->GetClassName(), 32, 40);