Edit:
NVM your problem isn't the c_str(), userInput is already char.strcpy (cstr, userInput);
userInput is a string *
which means you have to dereference it using the -> operator, so userInput->c_str()
@OP You still will need to include <string>
if you are using std::string in your code.