#include <stdio.h> void get_one_line(FILE *fl, char *buf) { if (fgets(buf, 256, fl) == NULL) { return; } } int main(int argc, char **argv) { FILE *fp; int players = 0; char line[256]; // load the file containing the player statistics and return the value if (!(fp = fopen("player_stats","r+b"))) players = 98; else { get_one_line(fp, line); if(*line == '#') sscanf(line,"#%d", &players); else players = 99; fclose(fp); } //players = 30; printf( "%d\r\n" "0\r\n" "0\r\n" "0\r\n", players); return (0); }