Originally Posted by
dwks
The this pointer.
see thats what I thought. But then I did this in the public function bet_or_pass() in the class Player before I posted:
Code:
high_bidder = this;
and got this compile error:
Code:
game.cpp: In member function `void Player::bet_or_pass()':
game.cpp:266: no match for `Player& = Player* const' operator
game.cpp:42: candidates are: Player& Player::operator=(const Player&)
I initialized the global variable high_bidder like this:
Code:
Player high_bidder;
[edit] I re-read what you put and you said pointer. So, I just did this:
Code:
high_bidder = *this;
and it worked. Thanks for the help. The keyword was pointer. haha.
[/edit]