Re: Debug Assertion Failure
First of all, a big 'thank you' to you both for your quick replies.
I don't use any direct memory allocation or deallocation in the
program - everything is done using STL queues. In particular, in the
function in question there isn't a single "new" or "delete" command.
Perhaps it would be best if I just showed you the function, so you can
see for yourself
bool CMrStorage::LoadMe(CUserList& List)
{
CFileHandler m_UserFile("Testing.txt",sizeof(CUser_IO));
CUser_IO temp_user;
CUser user;
long iter;
user.SetUserName("alpha");
user.SetPassword("bravo");
user.SetId(30142313);
user.SetClearance(STUDENT);
iter = m_UserFile.GetHeadOffset();
while (iter != NULL)
{
m_UserFile.ReadFromFile(reinterpret_cast<char*>(&temp_user),iter);
List.AddToList(user);
iter = m_UserFile.GetNextLink(iter);
}
return true;
}
When the complier hits the 'return true' line, the error pops. The
function is eventually supposed to bring up a list of users from the
memory, and add them one by one into CUserList (which is a queue of
CUsers). For now, I insert dummy values and ignore the ones which come
from the file, until this problem is solved.
Again, thanks in advance for your help!
GK