hi there,
I have an issue when overloading <<.
when I call this function:
cout << currentPlayerLo cation;
Its cout's the actual memory address - 00346380 instead of the string roomDescription .
What am I doing wrong?
I have an issue when overloading <<.
Code:
string operator << (room * ¤tPlayerLocation);
string room::operator << (room * ¤tPlayerLocation)
{
return roomDescription;
}
cout << currentPlayerLo cation;
Its cout's the actual memory address - 00346380 instead of the string roomDescription .
What am I doing wrong?
Comment