I'm learning about reading and writing to a random access file in my C++ class. I noticed that seekp and seekg do the same things respectively. So i tried to use seekp to do some reading and writing and it work as far as i can tell. So my question is can you use them interchangeably if you don't care about proper programming standards.
I'm not saying i don't care about proper standards just a curiosity question
Yes, a standard fstream's basic_filebuf has only one file position and both seekp and seekg manipulate the same value. But if you start mixing them up, you won't be able to switch from fstream to stringstream, for example, where put and get pointers are different.