whether tellp() not defined in append mode?
I was experimenting with file pointers in C++. In below code, the result obtained is 0, 30, 10 and 12. So it means that tellp() does not give correct result in append mode if we do seekp(). I was expecting tellp() to give me 32 after seekp() and appending data. I understand that in app mode, writing is always to the end and hence got this doubt. Does the result mean that tellp() position does not matter in append mode? The contents of h1.txt file is : 01234567891011121314151617181911 and is is as expected. ofstream f1("h1.txt",ios::app|ios::out); if (!f1) { cerr<<"cannot open the file\n"; exit