Reference » Service classes » MFile » getPos

Elgrint::MFile::getPos() method

Declaration (see MFile.h):

MFileSize getPos() const;


Returns the current position of the file pointer.

Return type: MFileSize


The file pointer determines the location where the read and write operations begin, and is moved during those operations to the first byte beyond the last read/written byte (see operator<< and operator>>).

The file pointer's position is equal to the offset in bytes from the beginning of the file, so position 0 is the first byte of the file.

If the file is closed (isOpen returns false), then getPos returns 0.

See MFile for a usage example.


Let us know

Please Contact us to report any errors on this page, or to suggest any improvements.

Miranor Home | About Miranor | About Elgrint | Create account | Login | Account settings | Contact Us | Privacy Policy | Site map

© Copyright 2014 by Miranor. All rights reserved. By using this site you agree to the Terms of Use.

Page last updated on August 10th, 2014.