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

Code Example 1

std::ostringstream strs;
strs << dbl;
std::string str = strs.str();

Learn ReactJs, React Native from akashmittal.com