Hey I'm not sure what might be giving you that error, but I see one thing that worries me.
totalgrade is declared inside a loop.. not sure what happens if that statement is executed twice.. or if does that loop more than once in runtime, but you'd probly be best to declare totalgrade at the beginning of main() with yer other declarations.. then you can just say totalgrade = 0;
in that if block
btw LOL @ assgrade
nice identifier there bub
p.s. please use code tags when posting code. it's the button right above BOLD. makes it look so pretty..
and in this case might be useful to see the content of your text files too..
while(take1>>ID>>name>>lastname) //read some stuff in to the arrays
//some other code
The ID and ID2 and name and lastname arrays are only 2 characters big each!
You are not going to fit much of a name or ID into an array of 2 chars ( you can only fit ONE char because you will need the second char to be the terminating \0 char)
yeah sorry i corrected this problem earlier but i didn't update my code here when i wrote it like this i was just trying different solution to try to fix my problem . now i have fixed part of the problem but the main problem is when the cursor reaches the end of the file this is giving the error.