+ 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.

17th Sep 2017, 4:59 PM
Germain F
Germain F - avatar
4 Answers
+ 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.
17th Sep 2017, 5:13 PM
Ace - avatar
+ 3
thanks @Ace. what you have given cleared the bug
17th Sep 2017, 6:32 PM
Germain F
Germain F - avatar
+ 1
please dont post same post twice... delet the another one
17th Sep 2017, 5:04 PM
sayan chandra
sayan chandra - avatar
+ 1
@sayan you didn't answer the question. worry about my mistake later. your answer wont help me in anyway.
17th Sep 2017, 6:27 PM
Germain F
Germain F - avatar