Your symptoms exactly exhibit the known bug in the STRING header in Visual C++ version 6. The latest service pack that I could find is Service Pack 5, and it does not fix the problem.
Try this, from
http://support.microsoft.com/default...0015#appliesto
Quote:
quote:
This article was previously published under Q240015
SYMPTOMS
The Standard C++ Library template getline function reads an extra character after encountering the delimiter. Please refer to the sample program in the More Information section for details.
RESOLUTION
Modify the getline member function, which can be found in the following system header file string, as follows:
Code:
else if (_Tr::eq((_E)_C, _D))
{_Chg = true;
// _I.rdbuf()->snextc(); /* Remove this line and add the line below.*/
_I.rdbuf()->sbumpc();
break; }
NOTE: Because the resolution involves modifying a system header file, extreme care should be taken to ensure that nothing else is changed in the header file. Microsoft is not responsible for any problems resulting from unwanted changes to the system header files.
|
Regards,
Dave