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
Code:
if(CheckBox21->Checked)
{
wac<<"if never() then"<<endl;
wac<<"breathtime ="<<Edit3->Text.c_str()<<endl;
wac<<"endif"<<endl;
wac<<endl;
}
but what i would like to do, is divide the users input by half.
so if they enter 20, it will create
if never() then
breathtime = 10
endif
in the wac file.
any help with this would be appreciated
Edit:
ive added this to the "on key press" of the editbox
Code:
void __fastcall TForm1::Edit2KeyPress(TObject *Sender, char &Key)
{
if ((Key < 48 || Key > 57) && Key != 8) Key = 0;
}
so now only numerical datacan be entered.... just leaves the division