devxlogo

August 19, 2000

Invoking Overloaded Operators Explicitly

The overloaded operator mechanism is “syntactic sugar” for ordinary function calls. You can always use the explicit name of an overloaded operator function to resolve ambiguities or document your intention.

Getting the Current File Position

The standard function ftell() reports the current file pointer position. The file pointer is a numeric value that represents the current position in the file in the form of offset

Rewinding a File

Instead of using the following form to rewind a file: fseek (fstream, 0, SEEK_SET); You can use the standard function rewind() as a shorthand. rewind() is declared in as follows:

Rewind a File

Instead of using the following form to rewind a file: fseek (fstream, 0, SEEK_SET); You can use the standard function rewind() as a shorthand. rewind() is declared in as follows: