this is what i am trying but it aint working

Code:
while (fptr == '\n')
         counter++;
fptr is a file pointer and counter is counting the number of times there is a newline.

why is it wrong? and what would be the right code otherwise


can someone plz help
thanks