Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Consequently, using any other values for pos will result in undefined behavior and should be avoided.

Noncompliant Code Example

The following This noncompliant code example attempts to read three values from a file and then set the cursor position back to the beginning of the file and return to the caller.

...

However, because only the return value of a fgetpos() call is a valid argument to fsetpos(); , passing an fpos_t value that was created in any other way may not work. It is possible that the position will be set to an arbitrary location in the file.

...