to string is making char a number c++ code example Example: why convert char* to string c++ char *cStr = "C++"; std::string Str = std::string(cStr);