alright, heres the relevant code:
Code:
CUserList :: CUserList ()
{
m_Reader.open ( USERLIST );
cout << "try open" << endl;
if ( !m_Reader )
{
cout << "open failed" << endl;
m_Writer.open ( USERLIST );
m_Writer.close();
m_Reader.open ( USERLIST );
m_EmptyFile = true;
}
else
m_EmptyFile = false;
readFile();
}
void CUserList :: readFile ()
{
char temp [ MAXLINE ];
string tempStr;
while ( !m_Reader.eof() && !m_EmptyFile )
{
m_Reader.getline ( temp, MAXLINE );
tempStr = temp;
m_Connections.AddNode ( tempStr );
}
}
the m_EmptyFile i threw in there to take care of the first time the file is created.... if this instance of the program created the file, then it's going to know it's empty, obviously.... but this obviously didn't solve my problem either, i realize, so that's expendable at this point.
... there could be plenty more problems.... i'm not the most experienced programmer, so any help is appreciated