I have a Visual C++ Windowed project that I do some mysql queries with and then loop through the results to put into a textBox. It goes something like this.
The value of row[0] will either be a char or string.
The managed side of it requires the strings to be System::String, while the mysql queries and results are std::string or char. So, I have to convert them inside the loop.
I understand that the strings are gc'd when they go out of scope, but I know I shouldn't be creating it like this.