I am a student , studying at home.
I have just begun C++ reference book by Sietel and dietel .
In coding an exercise , i am facing difficulty in getting the answer in decimal figures , although i am using data type " float ". code has been furtheer simplified just to indicate the problem.
The book tells to use an unfamiliar function
static_cast (total) / 3 ;
cout << " Average is " << setprecision (4)
<< setioflage(ios::fixed | ios::showpoint)
<< avg << end1 ;
Obviously , at this stage i do not know from where and how to get these data types , and their usage.
My Questios are :
1. Is there any other data type , that might give decimal answer?
2. where can I get above refered functions , and to know their
3. end1 --- command is not being supported by the Dev C++
version 184.108.40.206 ........... what is the alternative.
Thanking you .