ILE C/C++ Programmer's Guide

Determining the Precision of a _DecimalT Class Template

When you use the member function PrecisionOf() with a _DecimalT class template, you can determine the number of decimal digits p in a _DecimalT class template, as shown in the following figure.

Figure 306. Example of Determining the Number of Decimal Digits p of a _DecimalT Class Template



int p,p1;
_DecimalT <5, 2> x;
p=x.PrecisionOf(); // The result is p=2


[ Top of Page | Previous Page | Next Page | Table of Contents ]