There is a variable:
int a = 5; you need to make 5 translated to string
string c = int a; only it does not work, but how to make it work, if it can be done at all
There is a variable:
int a = 5; you need to make 5 translated to string
string c = int a; only it does not work, but how to make it work, if it can be done at all
Functions for converting numeric types to strings
#include <iostream> int main() { int a; std::cin >> a; std::string str; str = std::to_string(a); //преобразование из числа в строку std::cout << str << std::endl; return 0; } Source: https://ru.stackoverflow.com/questions/826862/
All Articles
с = to_string(a);- Harry