i have floating point variables "lmin" and "lmax". I want to display only 4 significant digits. I am currently using what I found online in the form ...
string textout; stringstream ss; ss << lmin; textout = ss.str(); output(-0.5, -0.875, textout); ss.str(""); ss << lmax; textout = ss.str(); output(0.2, -0.875, textout);
where "output" is just a function that I wrote to parse a string and print it on the screen. the important point is how do I print only the ROUNDED version of lmin and lmax for ss?
source share