CPP02 1.0
|
Implementation of the Fixed class with overloaded operators and min/max functions. [詳解]
関数 | |
std::ostream & | operator<< (std::ostream &o, const Fixed &fixed) |
Overloads the output stream operator to insert the float representation of the fixed-point number into the output stream. | |
Implementation of the Fixed class with overloaded operators and min/max functions.
This file defines the member functions of the Fixed class, including constructors, destructor, raw bit access methods, conversion methods, overloaded comparison operators (>, <, >=, <=, ==, !=), overloaded arithmetic operators (+, -, *, /), overloaded increment/decrement operators (++pre, ++post, –pre, –post), and static min/max functions. It also handles division by zero by outputting an error message and returning the maximum float value.
Fixed.cpp に定義があります。
std::ostream & operator<< | ( | std::ostream & | o, |
const Fixed & | fixed | ||
) |
Overloads the output stream operator to insert the float representation of the fixed-point number into the output stream.
o | The output stream object. |
fixed | The Fixed object to insert. |
< [add_overload_insertion] [add_overload_insertion]