Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

How to change the file indicator position in cpp?

Status
Not open for further replies.

42ndEngineer

Newbie level 2
Newbie level 2
Joined
May 24, 2020
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
12
I tried using seekg but it didnt work. Im trying to read a specific line(like 3rd line) by getline function. When i use seekg i cant even read from the start(i tried seekg(0)). It would be great if anyone can help.
 

I haven't used seekg, but how would you use it to read a specific line?
It seems that seekg doesn't know anything about lines.

I think you should use getline repeatedly until you reach the wanted line, and just ignore the lines before it.
 

I did what you said but i was looking or an efficient way because if i move indicator where i want it would improve my code so much.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top