if ( fgets( line, sizeof(line), stdin ) == (char*) 0 )...
I don't understand what this line does,anyone knows?
That's a rather odd way of writing a test for the return of a null pointer which indicates an error in fgets().
fgets()
I'd write it like this:
if (!fgets(line, sizeof(line), stdin))
1.4m articles
1.4m replys
5 comments
57.0k users