Answer to Question #44674 in C++ for sud

Question #44674
hey !

the snippet is not inserting char x at beginning of the file but at end ..tellp is though showing correct position.. any clue!


fstream objout(filepath,ios::out|ios::ate);
objout.seekp(0);
objout.put('x');
long l= objout.tellp();
cout<<"\n"<<l;
objout.close();

Thnks geeks..
0
Expert's answer

Answer in progress...

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
APPROVED BY CLIENTS