Hi I am trying to convert a string to char* using casting.
std::string str= "whatever";
char* val = (char*) str.c_str();
which compiles fine. But i end up with a const char despite casing it to a char*. I want to be able to append to this char array. Any ideas?
Thank You
std::string str= "whatever";
char* val = (char*) str.c_str();
which compiles fine. But i end up with a const char despite casing it to a char*. I want to be able to append to this char array. Any ideas?
Thank You
Comment