Check out example codes for "c++ itoa". It will help you in understanding the concepts better.

Code Example 1

#include <sstream>

int i = 5;
std::string s;
std::stringstream out;
out << i;
s = out.str();

Learn ReactJs, React Native from akashmittal.com