stl problem

Rick Sivernell res005ru
Mon May 17 11:59:31 PDT 2004


> Please post the offending code. Keep it short but illustrate the problem.
> Without seeing the code, I'd guess you're scribbling on uninitialized
> memory or {under,over}runing the buffer.

Kurt


const int g_iMAX_STRINGS = 100; // set the max # of string in a list of strings

  char   l_szLine[g_iINI_MAXLINE];  // must use a char type to get data
 

  do
  {
    if(m_FileStream->good())
    {
      m_FileStream->getline(l_szLine,g_iMAX_STRINGS,'\n');
      cout << "line is " << l_szLine << endl;
    }
  }
  while( !m_FileStream->eof() && !m_FileStream->fail() &&
           !OnStringCompareExact(l_szSectionName,l_szLine));

  Been using this for several years, do not understand why it is blowing up now,
thanks

-- 
Rick Sivernell
Dallas, Texas  75287
972 306-2296
res005ru at gte.net
Gentoo Linux
Registered Linux User #193859

   .~.
  / v \
 /( _ )\
   ^ ^
In Linux we trust!


More information about the Linux-users mailing list