how to make string from chars code example Example: string to char* std::string str = "string"; const char *cstr = str.c_str();