sudarshantk
asked on
Compilation Errors
warning: unused variable `fp'
Even though I am using the fp variable
fp=fopen("Reader.xml", "rb");
fgets(Buff, sizeof(Buff), fp);
Anyone know why...
Even though I am using the fp variable
fp=fopen("Reader.xml", "rb");
fgets(Buff, sizeof(Buff), fp);
Anyone know why...
Hi sudarshantk,
FILE * fp; // Will cause a warning.
...
{
FILE *fp;
...
fp=fopen("Reader.xml", "rb");
fgets(Buff, sizeof(Buff), fp);
}
Perhaps you could post a little more code.
Paul
FILE * fp; // Will cause a warning.
...
{
FILE *fp;
...
fp=fopen("Reader.xml", "rb");
fgets(Buff, sizeof(Buff), fp);
}
Perhaps you could post a little more code.
Paul
i din't see any complie error on my VC. by the way try with adding this line on your code for initialization.
FILE *fp=NULL;
regards
marchent
FILE *fp=NULL;
regards
marchent
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks
Also make sure that code is reachable, and not accidentally in a comment or #ifdef or a if( 0 )