Assuming:
std::string ToShow,NumStr;
The following displays "This is 19 ch00":
ToShow = "This is nineteen ch";
ToShow.resize(ToShow.length()+0);
NumStr = "00";
ToShow += NumStr;
mvaddstr(15,0,ToShow.c_str());
And the following displays "This is 19 ch ":
ToShow = "This is nineteen ch";
ToShow.resize(ToShow.length()+1);
NumStr = "0";
ToShow += NumStr;
mvaddstr(16,0,ToShow.c_str());
In the second case, operator+= isn't adding the string "0" to the end of ToShow. Does anyone know why?