12
int number = 123;std::string converted = std::to_string(number);
1234
int number = 123;char buffer[10];std::sprintf(buffer, "%d", number);std::string str(buffer);
float n;sscanf("12345.00000123", "%f", &n);
int n;sscanf("12345", "%d", &n);
unsigned int n;sscanf("12345", "%ud", &n);