ILE C/C++ Programmer's Guide

Determining the Number of Digits in a _DecimalT Class Template

When you use the member function DigitsOf() with a _DecimalT class template, you can find out the total number of digits n in a _DecimalT class template.

Figure 305. Example of Determining the Number of Digits in a _DecimalT Class Template




int n,n1;
_DecimalT <5, 2> x;
n = x.DigitsOf(); // the result is n=5


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