how to convert string to char* code example
Example 1: string to char array c++
std::string myWord = "myWord";
char myArray[myWord.size()+1];//as 1 char space for null is also required
strcpy(myArray, myWord.c_str());
Example 2: java convert a string to char[]
String string = "ABCDEF" ;
char[] charsFromString = string.toCharArray(); // { 'A', 'B', 'C', 'D', 'E', 'F' }
Example 3: convert char to char*
char c;
char *pChar = &c;