Hello all
I'm writing a Console application that supports MFC. Basically, it scans through a text file and updates a datbase with the data in the file. Pretty simple stuff - but I have a strange problem which I can only assume is related to memory management.
I'm getting a heap error when I try to use CString::Right() - HEAP: Free Heap block 4b5d408 modified at 4b5d47c after it was freed.
I'm sure it isn't CString that's the problem here as when I comment this line out the error moves elsewhere. (it just seems to move to the next instruction that involves allocating memory).
The weird thing is, the program will run for a bit and then fail - i.e. it will process the first three or so lines of my text file but then gives a "user breakpoint" error and the debug window will show the heap error.
Any ideas?
Thanks in advance for any help
CMR
I'm writing a Console application that supports MFC. Basically, it scans through a text file and updates a datbase with the data in the file. Pretty simple stuff - but I have a strange problem which I can only assume is related to memory management.
I'm getting a heap error when I try to use CString::Right() - HEAP: Free Heap block 4b5d408 modified at 4b5d47c after it was freed.
I'm sure it isn't CString that's the problem here as when I comment this line out the error moves elsewhere. (it just seems to move to the next instruction that involves allocating memory).
The weird thing is, the program will run for a bit and then fail - i.e. it will process the first three or so lines of my text file but then gives a "user breakpoint" error and the debug window will show the heap error.
Any ideas?
Thanks in advance for any help
CMR