char * means "character pointer".
You can create a pointer to a string:
char* myString = "My long string";
Alternatively, you can use std :: string:
std::string myStdString("Another long string"); const char* myStdString.c_str();
Note the constant at the beginning of the last example. This means that you cannot change the characters you point to. You can do the same with the first example:
const char* = "My long string";
Seb rose
source share