File processing : file-position pointer | Sololearn: Learn to code for FREE!

+7

File processing : file-position pointer

c++ has it that every object of an fstream has a file-position pointer which i don't understand its role and how it works in a file.

9/17/2017 4:59:02 PM

Germain F

4 Answers

New Answer

+11

Rather than write a lengthy tutorial on how files work, I will just direct you here: http://www.techrepublic.com/article/why-should-you-choose-fstream-classes-for-file-i-o-in-c-plus-plus/ At the basic level, the File pointer is used to navigate through the file. When the file is opened successfully, it points to the beginning of the file. It is essentially an integer pointer that tells you how far you are from the beginning/end of the file.

+3

thanks @Ace. what you have given cleared the bug

+1

please dont post same post twice... delet the another one

+1

@sayan you didn't answer the question. worry about my mistake later. your answer wont help me in anyway.