I thought if you open a file in text mode you can use '\n' which implicitly expands to the platform specific newline.
the below code never compares '\n' to be true. What's the easiest way to do such a comparison?
Code:FILE* istream = fopen("text.txt", "r"); while ( EOF != (c = fgetc(istream)) ) { if ( '\n' == c ) { puts("detected newline"); } }