lemming999
Programmer
Hi, very novice programmer here, When I run this function, it prints out the first messageBox (ie when count == 0 but it doesn't go to the next messageBox, i know that they're are more than 1 entry in the file I'm loading.
any ideas, its very similar to code that i got to work with a static text outputting program
while (!DataIn.eof()) // While more entries
{
int count;
DataIn.read((char*)&entry,sizeof(DataIn));
if(DataIn.eof()) //eof not set till after end
break;
if(count == 0)
{
strcpy(First.name,entry.name);
MessageBox(hwnd, First.name, TEXT("HelloMsg", 0);
count++;
}
else
{
strcpy(Current.name,entry.name);
MessageBox(hwnd, Current.name, TEXT("HelloMsg", 0);
}
}
DataIn.clear(); // Reset eof flag
return TRUE;
}
Thanks,
Brian
any ideas, its very similar to code that i got to work with a static text outputting program
while (!DataIn.eof()) // While more entries
{
int count;
DataIn.read((char*)&entry,sizeof(DataIn));
if(DataIn.eof()) //eof not set till after end
break;
if(count == 0)
{
strcpy(First.name,entry.name);
MessageBox(hwnd, First.name, TEXT("HelloMsg", 0);
count++;
}
else
{
strcpy(Current.name,entry.name);
MessageBox(hwnd, Current.name, TEXT("HelloMsg", 0);
}
}
DataIn.clear(); // Reset eof flag
return TRUE;
}
Thanks,
Brian