CPP02 1.0
読み取り中…
検索中…
一致する文字列を見つけられません
Fixed.cpp ファイル

Implementation of the Fixed class with overloaded operators and min/max functions. [詳解]

#include "Fixed.hpp"
#include <cmath>
#include <iostream>
#include <limits>
Fixed.cpp の依存先関係図:

[ソースコード]

関数

std::ostreamoperator<< (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 に定義があります。

関数詳解

◆ operator<<()

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.

引数
oThe output stream object.
fixedThe Fixed object to insert.
戻り値
A reference to the output stream.

< [add_overload_insertion] [add_overload_insertion]

Fixed.cpp64 行目に定義があります。