Using Pictures
Here is one way to use a picture to print a number onto a stream:
 
RWDecimal<RWMP1Int> x = "4.367";
cout << RWDecimalFormat("_____.__")(x);// prints 4.37
This code constructs a formatter object from a picture string, and then invokes the function call operator with argument x. The function call operator has been overloaded to format an RWDecimal<T> into an RWCString. Finally the string is shifted out to standard output.
If you plan to use a particular picture over and over, it is more efficient to construct a single formatter object and reuse it. Here's how:
 
RWDecimalFormat format("_____.__");
cout << format(x) << format(y);// x and y are RWDecimals