Check out example codes for "convert a int to string c++". It will help you in understanding the concepts better.

Code Example 1

#include <iostream>
#include<string>
using namespace std;
int main()
{
int i = 11;
float f = 12.3;
string str = to_string(i);
strinf fstr = to_string(f);
}

Code Example 2

#include <iostream>  
#include <boost/lexical_cast.hpp>  
using namespace std;  
int main()  
{  
 int i=11;  
 string str = boost::lexical_cast<string>(i);  
cout<<"string value of integer i is :"<<str<<"\n";  
  
}

Code Example 3

// EXAMPLE
int iIntAsInt = 658;
std::string sIntAsString = to_string(iIntAsInt);

/* SYNTAX
to_string(<your-integer>)
*/

/* HEADERS
#include <string>
*/

Learn ReactJs, React Native from akashmittal.com