Reading and printing a text file

#include
#include
#include

void help(void) {
char line[80];
FILE *help;

help = fopen ("help.txt", "r");
if (help == NULL)
{
printf("help.txt kan niet geopend worden!");
}
do {
fscanf(help,"%[^/n]",line);
printf("%s/n",line;
} while (!feof(help));

fclose(help);

getch();
}

No comments:

Post a Comment