Hi!
I am reading a text file line by line, using CStdioFile and ReadString.
Is there any way to know what number of line I am reading?
Thank you in advance.
Printable View
Hi!
I am reading a text file line by line, using CStdioFile and ReadString.
Is there any way to know what number of line I am reading?
Thank you in advance.
What about a counter variable? Just increment it each time you call ReadString.
Yes, I thought that... but I am searching for a function like GetCurLine for CArchive.
If there isn't other method, I will have to use a counter.
Thank you for your answer.
No, there is no such thing as GetCurLine() for CStdioFile. Now, depending on your motivation for requiring such a function, an idea might be to derive a class from CStdioFile and implement the counter and GetCurLine() there.