Originally Posted by
laserlight
Post the smallest and simplest compilable program that demonstrates the problem.
Okay I believe that this would be the shortest code that would compile.
Code:
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
void printReport( FILE **inputFILE);
#define CHECK "************************************************************\n"
#define CHECKBORDER "* Check No. %3d *\n"
#define CHECKFORMAT "* *\n"
int number;
FILE * inputFILE;
printReport(&inputFILE);
fprintf(stdout, CHECK);
fprintf(stdout, CHECKBORDER, number);
fprintf(stdout,CHECKFORMAT);
fclose(inputFILE);
void printReport( FILE **inputFILE)
{
*inputFILE=fopen("./check.txt","r");
if(*inputFILE==NULL)
{
printf("File cannot be accessed");
exit(-80);
}
}