Just wondering if anyone could point me in the right direction. I have a friend extraction operator that works if i include namespace std; but fails if i do not. can anyone give me a hint?
this is also a friend function, so i have this in my class.h file (as a friend)
in my functions.h file (as the prototype) and in my functions.cpp file (the logic).
ive tried making it
std::ostream& operator....
std::ostream& operator std::<< (etc)
but i just cant see where im going wrong. My compiler keeps telling me 'ostream does not name a type'
thank you
ostream& operator << (ostream &out, coins &value)
this is also a friend function, so i have this in my class.h file (as a friend)
in my functions.h file (as the prototype) and in my functions.cpp file (the logic).
ive tried making it
std::ostream& operator....
std::ostream& operator std::<< (etc)
but i just cant see where im going wrong. My compiler keeps telling me 'ostream does not name a type'
thank you