//itoa( groupID, buffer, 10);
std::string buffer;
- for(int k = groupID; k == 0; k++){
- char temp = k % 10 + 48;
- k = k / 10;
- buffer = temp + buffer;
+
+ if(groupID == 0){
+ buffer = "0";
+ }else{
+ int k=groupID;
+ while (k > 0){
+ char temp = k % 10 + 48;
+ k = k / 10;
+ buffer = temp + buffer;
+ }
}
//wxCheckBox *checkbox = new wxCheckBox( this, -1, wxString( label.c_str(), wxConvUTF8), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, wxString( buffer, wxConvUTF8) );
std::string wxContourEventHandler::intToString(int num){
std::string result;
- for(int k = num; k == 0; k++){
- char temp = k % 10 + 48;
- k = k / 10;
- result = temp + result;
+ if(num == 0){
+ result = "0";
+ }else{
+ int k=num;
+ while (k > 0){
+ char temp = k % 10 + 48;
+ k = k / 10;
+ result = temp + result;
+ }
}
return result;
}