Question: My professor is asking to set precision when extracting a value from a file. But unsure what he means Notes For data precision on stdout
My professor is asking to set precision when extracting a value from a file. But unsure what he means
Notes
For data precision on stdout we use the code below:
cout.setf::showpoint;
cout.setf::fixed;
cout.precision;
This will not have any effect on the files. So you'll have to use a similar code. Recall the similarity from
outputting to stdout cout "Hello"; and a file outFile "Hello"; So you will have to do something
similar:
outFile.setf::showpoint;
outFile.setf::fixed;
outFile.precision;
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
