type Currency = Currency;
class RTL_DELPHIRETURN Currency : public CurrencyBase
Currency is the C++ implementation of the Object Pascal Currency data type.
Use Currency to hold monetary values.
Note: A Currency object is implemented as a 64-bit signed integer. Avoid operations that might cause integer overflow. The interval of Currency is [-922337203685477.5807; 922337203685477.5807].
Use only the operators defined by Currency. The compiler ignores any operators you overload yourself. Use the Currency constructors to create Currency objects from pointers to other Currency objects, and also from numeric and string values.
To utilize the C++ streaming operators (
>>) with Currency, you must include the
iostream library before the
#include <iostream> #include <syscurr> ...
The following stream operators are defined:
ostream& operator << (ostream& os, const Currency& arg); istream& operator >> (istream& is, Currency& arg);
Currency is a fixed-point data type. The maximum error when converting from floating-point to Currency is 0.00005.