conver character character to string cpp code example
Example 1: char to string c++
std::cout << std::string(1, c) << std::endl;
Example 2: why convert char* to string c++
char *cStr = "C++";
std::string Str = std::string(cStr);
std::cout << std::string(1, c) << std::endl;
char *cStr = "C++";
std::string Str = std::string(cStr);