change integer to string c++
#include <iostream>
#include <string>
using namespace std;
int main() {
int num = 123;
string strNum = to_string(num);
cout << "The converted string is: " << strNum << endl;
return 0;
}
#include <iostream>
#include <string>
using namespace std;
int main() {
int num = 123;
string strNum = to_string(num);
cout << "The converted string is: " << strNum << endl;
return 0;
}