Count Row
-
I want to count number of rows in a selected file. I also need to do it with QFile and QDir.
Thanks for your help.@eefesafak
Assuming by "rows" you mean "lines". Open the file for text read, useQFile::readline()to read lines, count as you go? -
why do something programatically that already exists in command line utils?
wc -l file
but I digres since these kind of questions often indicate a sub-optimal file IO paradigm like line based file records. Bleck!