August 2002
Beginner
1122 pages
22h 1m
English
Now that we've covered that new construct, let's take a look at the functions declared in the HomeUtility namespace, starting with ReadDoubleFromLine, which is shown in Figure 13.10.
bool HomeUtility::ReadDoubleFromLine(istream& is, double& Result)
{
double temp;
xstring garbage;
is >> Result;
return CheckNumericInput(is);
}
|
This function isn't terribly complicated. It uses the standard library input operator >> to read the data from an input stream into a double called Result, calls a function named CheckNumericInput (shown in Figure 13.15 on page 931), and returns the result of that function to the user.
However, there is one ...
Read now
Unlock full access