Discussion Locked
0 helpful
2 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
The get_line function promises to make reading lines from streams less cumbersome. Tell us how you will use it in your application development.
2 replies
I received this e-mail today - anyone want to provide an answer:
how do I read a determined line in a .txt file ?
i.e. I want to display in console the 45th line of a file.
by john torjo
There are multiple ways to achieve the above.
With the help of two tips we just published, you could do the following:
std::ifstream streamIn( strFileName);
std::string strLine;
streamIn >> ignore_lines( 44) >> get_line( strLine);
Best,
John
This discussion is closed to new replies.
Trending Web Development posts
Sort by Trending
Discussion Locked
What Makes a Business Website Effective in 2026
2 helpful
10 replies
1 helpful
3 replies
Question
Windows and macOS computers becoming slow or unstable after updates - what should I check first
0 helpful
1 reply
Question Unanswered
Best Way to Make Long WordPress Location Guides Mobile Friendly
0 helpful
0 replies
Discussion
Optimizing WordPress widgets and DOM size
0 helpful
3 replies