You forgot to add a return statement to the function.
I'm not sure exactly what you want to return from that function. If your plan is to return a pointer to the ch array that will not work because a char can only store a single character. If you change the return type to char* it would still not work because ch is a local variable inside the function and as soon as the function ends it would no longer exist.
If all you want is to get a char* from a std::string why not simply use the c_str() function right away? That's what it's for.