0
what is the difference b/n seekg() and seekp(), tellp() and tellg()
i know that seekg() is for get pointer and seekp() is for put pointer and the same for tellg() and tellp(). but in practice i didn't get the difference. both seeks do the same and both tells do the same.
1 Odpowiedź
+ 1
seekg() is used to move the get pointer to a desired location
seekp() is used to move the put pointer to a desired location
tellp() is used to know where the put pointer is in a file.
tellg() is used to know where the get pointer is in a file.