Use C++11 stoi, stod and to_string.