Class RWMoney<T> provides a mapping between an amount and a currency, by encapsulating a decimal value and referencing a currency. The C++ and Java versions of this class differ. In C++, the value is an arbitrary decimal type specified as a template parameter. In Java, the value is either a double or a BigDecimal.
The following examples creates some RWMoney objects:
In C++:
. . . RWMoney<RWDecimal64> x("1.23","USD"), y("9.87","USD"), z("7.99","CAD"); RWMoney<RWDecimal64> s("0","USD"); . . .
In Java:
Money x = new Money("1.23", "USD"); Money y = new Money("9.87", "USD"); Money z = new Money("7.99", "CAD"); Money s = new Money("0","USD");
©Copyright 1999, Rogue Wave Software, Inc.
Contact Rogue Wave about documentation or support issues.