What is the easiest way to convert from int to equivalent string in C++. I am aware of two methods. Is there any easier way?
int
string
(1)
This worked for me -
My code:
#include using namespace std; int main() { int n = 32; string s = to_string(n); cout << "string: " + s << endl; return 0; }