Here is the best and simplest way to go from a string to an array of characters in C++
Example Code:
std::string myString = “My Name is Sam”;
char *myCharArray = (char*)myString.c_str();
Here is the best and simplest way to go from a string to an array of characters in C++
Example Code:
std::string myString = “My Name is Sam”;
char *myCharArray = (char*)myString.c_str();
View Comments (0)