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

Code Example 1

std::cout << std::string(1, c) << std::endl;

Code Example 2

// example
char sczName[] = {"Jakes"};
std::string strName = std::string(sczName);

/* SYNTAX
#include <string>
std::string(<char-to-convert>)
*/

Learn ReactJs, React Native from akashmittal.com