Thank you Thomas for your help.
Here is the latest incarnation of my inserters and extractors:
friend std::ostream& operator<<( std::ostream&, const jme::Money& );
friend std::istream& operator>>( std::istream&, jme::Money
& );
std::ostream&
operator<<( std::ostream& os, const jme::Money& obj ) {
std::cout << "Check this out" << std::endl;
return os << obj.getAmount();
//return os;
}
std::istream&
operator>>( std::istream& is, jme
::Money& obj
) {
float tmp;
is >> tmp;
obj.setAmount(tmp);
return is;
}
I would expect that the statement
jme::Money money("12.21");
std::cout << " Value is: " << money << std::endl;
would display
Check this out
12.21
But in instead it displays 0x4c1094 !?
I don't even think my overloaded operators are beeing called when
extracting or inserting data.
I am really going *loco* with this part of the program. It just does
not make sence.
Can you help?
_______________________________________________
Help-gplusplus mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-gplusplus