Z
Z
ZIK13372019-04-18 17:22:18
C++ / C#
ZIK1337, 2019-04-18 17:22:18

How to count the number of lines in a file?

I'm trying to count the number of lines in the file (reading character by character), but the variable reads the characters 'H' constantly, there are a lot of them, although the file is only 3 lines of 3 characters each (text file), what could it be?

spoiler
vu6VZ4L.jpg

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Q
q2zoff, 2019-04-18
@ZIK1337

The file_ptr variable is not initialized or the file was opened with an error.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question