#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); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)