Hi, I have three classes one is a game board, the other a human component and the other a computer component. i overload both the << >> operators in all three classes
function prototypes are:
/**Board Class***/
friend istream& operator>> (istream &, Board & );
/***Human Class*****/
friend istream& operator>> (istream &, Human &);
/****Computer Class****/
friend istream& operator>>(istream &, Computer &);
The Human class and the Computer class both have pointers to the Board class when i compile i get this error message
no match for 'operator>>' in "in>>Human->Human::Human_Player;
code for Human class is as follows
Human_Player is the pointer to the Board class
Code:
istream& operator>> (istream &in, Human &Human)
{
in>>Human.Human_Player;
return in;
}