const char* convert to std::string:
const char *p = "Welcome to GeeksForGeeks"; // Conversion of char* to std::string using = std::string str = p;
std::string convert to const char*:
std::string str = "hello"; const char* p = str.c_str();
ref:
• Convert char* to std::string in C++ – GeeksforGeeks
• c++ – convert unicode to char – Stack Overflow
#C++ #coding #convert #UTF8 #programming