Hello, OnlineGDB Q&A section lets you put your programming query to fellow community users. Asking a solution for whole assignment is strictly not allowed. You may ask for help where you are stuck. Try to add as much information as possible so that fellow users can know about your problem statement easily.

How to overwrite in file in specific position in one file used for both reading and writing in c++?

0 votes
asked Dec 14, 2017 by anonymous
edited Dec 16, 2017 by Admin

1 Answer

0 votes
answered Feb 8, 2018 by Laxaman Pal (440 points)

Use file pointer manipulation functions: 

seekg(), seekp(), tellg(), tellp()...

seekg() and seekp() are used to change the position of the file pointer where the position is given as byte number in braces as parameter...

tellg() and tellp() are used to get the pointer position in bytes...

Cheers... yes

Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and and receive answers from other members of the community.
...