one char string to char code example
Example 1: string to char*
std::string str = "string";
const char *cstr = str.c_str();
Example 2: convert char to char*
char c;
char *pChar = &c;
std::string str = "string";
const char *cstr = str.c_str();
char c;
char *pChar = &c;