Easiest thing in the world: writing strings to a text file that are fetched from a listbox in C++ 6.0(or so I thought).
Here's my code:
using namespace std;
myfile << strMyString << endl;
The file gets created, and is written to. But when I open the file in windows explorer, instead of seeing the a string in the file, I see a number that looks like a memory address, such as 0034544C.
If I alter the code above, to write string like this:
myfile << "My Test String" << endl;
then the string gets written correctly.
So, the issue is perhaps with the call to the list box's GetText() function. However, in the debugger, the string variable I pass into the call to GetText() shows a valid string (in both the Watch window and when I mouse hover over the variable).
Thanks very much.