I have an issue with the file reading.
for example ,we have a set of cards but before it, there is an int like:
12
king of clubs
six of clubs
four of diamonds
six of hearts
four of hearts
If I use fgets and fputs to read and print the file, what can I do so that I star reading and print from the second line( skip the line with 12)
I called each line LINE and set a while loop
I dont succeed to skip the first line I tried LINE+1 but it is an horizontal displacement..Code:while( 1 ) {/*while begins*/ fgets(LINE, sizeof(LINE), fin); if ( feof(fin) ) /* check for EOF right after fgets() */ break; fputs(LINE, fout);}
Can I have some suuggestions?