thanks to everyone for your earlier replies, but i have yet another problem with file i/o. i'm trying to read multiple lines with the same file, and have been using the following code to take in the first two lines from a file...
fscanf(fileptr, "%d %d %d %d %d %d\n", &n1, &n2, &n3, &n4, &n5, &n6);
...some code in between...
fscanf(fileptr, "%d %d %d %d %d %d\n", &n1, &n2, &n3, &n4, &n5, &n6);
...what ends up happening is that it reads the first line in the file twice without continuing down to the second line. is there some sort of flag or identifier i need to set in order to ensure that the fileptr doesn't reset to the beginning? might i be accidentally resetting the fileptr (though i only use it in fopen, fclose, fscanf) inadvertently? any help would be greatly appreciated, thanks again...