Going to a specific line through ifstream

I want to access specific lines in a "*.txt" file.
I've heard of seekp() and what not, but don't know how to call them as such.
If someone could help me out, that'll be great.
Seek functions jump to a specific offset. This does not work for lines because each line can be of a different length, so there's no way of knowing at which offset a specific line starts.

The easiest way to seek to a specific line is to simply call getline() repeatedly to count the lines.

But get line isn't working in turbo, and sadly that's what I've programmed my entire project in.
Switch compilers. Turbo C++ is (a) terribly outdated, (b) full of bugs and (c) is not strictly C++.
Yeah, any recommendations? I hear Dev is a good alternative?
Only if you use Orwell Dev C++. Other good suggestions are Code::Blocks and (Windows only) Visual Studio — Express version is free.
Okay, I have code blocks already so I guess I'll go with that :D Thanks!
Topic archived. No new replies allowed.