Hello all:
I successfully use (int)i=fgetc(stream)
to read data from a file. But the problem is:
All the data in the file are integers, like 3 0 2 3 0 0 1. (with a space between every two integers)
Code:
for(i=0;(i<100)&&((n=fgetc(stream))!=EOF)&&(ch!='\n');i++)
{
buffer[i] = n;
printf("%d=%d ",i, buffer[i]); /*For debugging purpose only*/
}
numVerts = buffer[0];
The result I get for numVerts is actually 53, which is supposed to be 3.
Can anyone help me with this?
Thanks