Dear All,
I have one txt file which contains a set of data, everyline has one data. How can I detect how many data inside?
Thank you
Printable View
Dear All,
I have one txt file which contains a set of data, everyline has one data. How can I detect how many data inside?
Thank you
Likely you can read the file line by line. Lines will probably be seperated by the character '\n', write a loop to count how many of these your file has.
thank you.
I know this method, but I don't the code. Sorry, I am the new user of C/C++.
Do you know how to read a file? Look up fopen(), fclose() and fgets() if not.