#include #include Money::Money(void) : mValue(0.00), mFormat("% 12.2lf") { } Money::Money(double value) : mValue(value), mFormat("% 12.2lf") { } Money::Money(const Money &someMoney) { *this=someMoney; } Money::~Money() { } Money &Money::operator=(const Money &someMoney) { format(someMoney.format()); value(someMoney.value()); return *this; } void Money::format(const String &strFormat) { mFormat=strFormat; } const String &Money::format(void)const { return mFormat; } double Money::value(void)const { return mValue; } void Money::value(double value) { mValue=value; } Money::operator String(void) { String strString; String moneyString; ::sprintf(strString,mFormat,mValue); char *strPtr=strString; char *strRoot=strPtr; while(*strPtr!='.')strPtr++; while(TRUE) { for(int count=0;count<3&&strPtr>strRoot&&*strPtr!=' ';count++)strPtr--; if(strPtr