Hi, im new to the fun world of C++, learning it gradually as i go...
i have figured how to use the data the user enters in to an editbox like so
but what i would like to do, is divide the users input by half.
wac<<"if never() then"<<endl;
so if they enter 20, it will create
if never() then
breathtime = 10
in the wac file.
any help with this would be appreciated ;)
ive added this to the "on key press" of the editbox
so now only numerical datacan be entered.... just leaves the division
void __fastcall TForm1::Edit2KeyPress(TObject *Sender, char &Key)
if ((Key < 48 || Key > 57) && Key != 8) Key = 0;
//Convert from CString to int, then divide by 2
wac<<"breathtime ="<< atoi(Edit3->Text.c_str()) / 2 <<endl;
Thanks alot for your help . il read through the FAQ's before posting again.