X

C++ Convert String to Char Array

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();

fsb:

View Comments (0)

Disqus Comments Loading...