04-03-2002
18,
0
Join Date: Mar 2002
Last Activity: 8 December 2004, 1:38 AM EST
Location: Bangalore,Karnataka State,India
Posts: 18
Thanks Given: 0
Thanked 0 Times in 0 Posts
I found the ANSWER
Hi,
I found the answer for your problem
Take a look at the following program :
int n1, n2, n3, n4, n5, n6;
/* open config file */
if ((fileptr = fopen(filename,"r") )== NULL) {
printf("couldn't open file, errno: %d\n", errno);
exit(0);
}
fscanf(fileptr, "%d %d %d %d %d %d", &n1, &n2, &n3, &n4, &n5, &n6);
What I did was I introduced a pair of brackets around "fileptr".
I can bet that, you won't get the error any more.
thank you,
K.S.SHARATH CHANDRA
if ((fileptr = fopen(filename,"r") )== NULL)