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.Code:if(CheckBox21->Checked) { wac<<"if never() then"<<endl; wac<<"breathtime ="<<Edit3->Text.c_str()<<endl; wac<<"endif"<<endl; wac<<endl; }
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
so now only numerical datacan be entered.... just leaves the divisionCode:void __fastcall TForm1::Edit2KeyPress(TObject *Sender, char &Key) { if ((Key < 48 || Key > 57) && Key != 8) Key = 0; }



LinkBack URL
About LinkBacks



