Information Systems



std::stringstream decimal places

If you want to set the number of decimal places in a std template stream use the precision function.

std::stringstream ss;

ss.precision(2);

ss << 100;

// will get translated to 100.00