Hi guys,
Having a problem returning a whole char array from a function. (Player name)
For example, I have a player class, one of the attributes is char playerName[10].
I have a public function getName() to return this array. It currently only returns the first letter of the name.
This is the function to return array. (as defined in a corresponding .cpp file )
Code:char Player::getFirstName() { return *playerFirstName; }
Any ideas on what i'm doing wrong?
Regards,
-Kirill



LinkBack URL
About LinkBacks





