Create
a simple class with an overloaded
operator++.
Try calling this operator in both pre- and postfix form and see what kind of
compiler warning you get.
Create
a class that contains a single
privatechar.
Overload the iostream operators
<<
and
>>
(as in
Iosop.cpp)
and test them. You can test them with
fstreams,
strstreams,
and
stdiostreams
(
cin
and
cout).
Write
a
Number
class with overloaded operators for
+,
–, *, /
,
and assignment. Choose the return values for these functions so that
expressions can be chained together, and for efficiency. Write an automatic
type conversion
operator
int( )
.
Combine
the classes in
Unary.cpp
and
Binary.cpp.
Fix
Fanout.cpp
by creating an explicit function to call to perform the type conversion,
instead of one of the automatic conversion operators.