Each of the following regards a distinctive cout format. How do I return if to default in "Cpp 98 Standard"?
#include <iostream>
int main()
{
std::cout << std::fixed;
std::cout << std::setprecision(5) << f << '\n';
std::cout << "scientific:\n" << std::scientific;
/*Cpp 11 standard only*/
std::cout << " hexfloat: " << std::hexfloat << 0.01 << '\n';
"The number 0.01 in default: " << std::defaultfloat << 0.01; }
}
As in :
std::set_default?;
Also how do I perform
hexfloat and defaultfloat
in Cpp 98 standard?
also what is the technical difference between setwidth and setprecision?
Aucun commentaire:
Enregistrer un commentaire