Ok I have written this function but it doesn't work! Can you tell me why, what I need to do to fix it - or if there is a better way of doing it?
/* Function */
int OpenFile (void)
if ((read_rules = fopen(FILE_NAME, "r")) == NULL)
fprintf (stderr, "Failed to open %s\n", FILE_NAME);
fgets (stdout, , read_rules);
} while (!foef(read_rules));
/* And how it is called from main */
printf ("Do you wish to read the help file? [y/n] ");
if (scanf ("%c", &question) == 'y')
if (OpenFile ())
printf ("Error calling function OpenFile\n");
If the formatting is messed up sorry - but it's the browser not me!