Look up "pass by value" and "pass by reference" - you have "pass by value" but you are expecting "pass by reference"
 In C++: void convert(string& response) {
 In your case things are slightly "odd" because as pointed out in the comments by @NeilLocketz, you have a global response, the local response in the method - which is actually the global one since you use that as the calling parameter. If you want to do things properly, you probably don't want response to be global.
Note that the accepted answer still has more memory copies than this. The real key is to understand pass by value and pass by reference and use whichever one is appropriate to your circumstances.