Description: First, the design yuan classes, data members contains positive and negative signs, dollars, and cents, the design constructor, output function, the overloaded+,-, pre-increment, post-increment, pre-decrement, post-decrement, the output stream insertion operator << input stream extraction operator >>. which pre-decrement, post-decrement, << and >> overloaded as friend function.
Increment represents an increase of 1 cent. Decrement, reduced by 1 cent. Binary addition and subtraction and constructed to consider.
Write the main function testing.
Function:
A. Output and output of RMB must use the overloaded operator << and >>
Two. All unary operator operating for one yuan
(+ M-ary n-angle k points), indicating that m, n, k are positive
(-M-ary n-angle k), m, n, k are negative. Negative value of the yuan, said the deficit.
$ 0 0 angle 0+ denote
To Search:
File list (Check if you may need any files):
作业9 运算符重载.cpp