is this code ok?
void SomeClass :: foo(const char * _name) { //name is of type const char * name = std::string(_name).c_str(); }
I vote for strcpy. Why complicate simple things?
strcpy
Or even better - since you'll obviously need to use it later, why not convert it to a std::string and just use that afterwards, forgetting about all those char *?
std::string
char *