1std::string myWord = "myWord";
2char myArray[myWord.size()+1];//as 1 char space for null is also required
3strcpy(myArray, myWord.c_str());
1const char *array = tmp.c_str(); //For const char array
2char *array = &tmp[0]; // If you need to modify the array