Bug Work Around

The string::getline function in Visual C++ 6.0 does not work correctly. This is a known bug. A work around is to provide your own version of the function. The following is such a solution. It is limited in that it will only input lines up to 127 characters long, but if more is needed it can be easy modified.

void getline( std::istream& is, std::string& s, char d = '\n' )
{
  const int MAX = 128;
  char getbuff[MAX];
  is.getline(getbuff,MAX,d);
  s = std::string(getbuff,MAX);
}

Do not attempt to change the standard libraries, instead put this function in your application.