Hello Guys!
I need to round numbers with how many decimals i want, using C++ builder 6.
I saw on google, that to do that i need the setprecision(), but i can't show it
on a Memo!
But, when i click on button, shows it: 3,73456001281738
I don't understand..
#include<iostream>
#include<sstream>
#include<iomanip>
void __fastcall TForm1::Button1Click(TObject *Sender)
{
AnsiString strValue;
setprecision(2);
float value = 3.73456;
strValue = FloatToStr(value);
Memo1->Lines->Add(" " + strValue);
}
If i miss something, correct me please. I'm new here.
Thanks!!
PS* (sorry for the english, i'm learning, so.. take it easy..)