I have a quick question
How would i read in these numbers
from a .txt file without the commas?Code:1234,2345,3456,4568
I have a quick question
How would i read in these numbers
from a .txt file without the commas?Code:1234,2345,3456,4568
Can i just do this?
and have a loop to keep on reading?Code:fscanf("%d,", &a);
something like this
In this case I'm comparing the read in ID to another ID that a user inputedCode:while ( (fscanf(id, "%d,", &existId)) != EOF) { if(existId == userId) { printf ("Login Success\n"); return VALID; } }
sorry i should have said it earlier but i'm trying to identify each ID in a loop so i don't have to create so many variables.
I have looked in my text book but nothing mentions how i can do this. That is why i'm on the cboard.
Last edited by Teardrop3903; 03-10-2011 at 08:39 AM.