There is a constructor in RWDecimal that takes an int as a parameter. This is because ints are stored as exact values so there is not a problem in converting an int into an RWDecimal. Converting a float to an RWDecimal is a little more complicated. The way floats are stored in C++ is inexact (which is one of the reasons for creating Money.h++ in the first place). If you want to convert a float to an RWDecimal, you need to use the from member function. This was done deliberately because the results of calling this function may be inexact. Here is how you would write the same code if the shares variable was a float.