std::string company;
company = string("BRB");
quote->symbol = stringToCharArray(&company);
So if I later want to change the value of "company" to something else:
1 2
company = "TRT";
quote->symbol = stringToCharArray(&company);
This code is obviously wrong. Should I "free" quote->symbol before each assignment?
What is the proper way to convert a string to char* pass the result to a variable and later reuse that variable as many times as needed?
It's actually hard to say whether or not it would be appropriate here without knowing what you're doing. What gSoap is doing with this string would determine a lot of what you'd need to do here.