How to test for new line when reading from file char by char

Exactly as the title states. I am trying to read in a file char by char but at the same time keep track of how many lines there are and when a new line occurs. I want to be able to test for something such as if(char == '\0') but this is not working for me. I am reading the input in using this method: while(inputfile.get(char))
{

}

Thanks for your time!
if (ch == '\n')
Topic archived. No new replies allowed.