I had written a program
#include <fstream.h>
void main()
{
fstream f;
f.open("test.txt",ios::app|ios::in|ios::binary);
cout<<f.tellg();
f.close();
}
My file test.txt already contains text : " hello " i.e. 5 characters
But when i try this it outputs only 0 but ios::app mode places the pointer at the end of file so why it is not showing 5 instead of 0.