|
-
October 8th, 2003, 05:33 AM
#1
CStdioFile, get current line
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.
I am Miss Maiden... Miss Iron Maiden :-D
-
October 8th, 2003, 05:34 AM
#2
What about a counter variable? Just increment it each time you call ReadString.
-
October 8th, 2003, 05:38 AM
#3
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.
I am Miss Maiden... Miss Iron Maiden :-D
-
October 8th, 2003, 06:13 AM
#4
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|