The second one doesn't compile because std::setprecision
expects one argument
As for std::cout << std::fixed;
, it is the same as std::cout.setf(std::ios_base::fixed, std::ios_base::floatfield);
by definition
Last edited on
oh thank you , so it's the same assuming I included " using namespace std; " in the function?