What is the difference b/w seekg() and seekp()? Similarly what is the difference between tellg() and tellp()? Does they depend upon how I open my file in reading or writing mode?
it may be a little confusing because they cannot be different on file streams (because C++ file streams are built on top of C file streams, and C file streams have only one position)
std::stringstream is where their difference can be most readily demonstrated.