Topic: seekoff question


Author: ray@cse.ucsc.edu (Ray Swartz)
Date: 7 Dec 1994 17:24:35 GMT
Raw View
How does the standard currently deal with seeking in a stream?

It used to be using the seekoff function on  a streamoff object.

I've noticed that language implementations use seekg and seekp
on the stream itself.

What's the current state of the standard?

Ray Swartz







Author: clamage@Eng.Sun.COM (Steve Clamage)
Date: 7 Dec 1994 19:15:21 GMT
Raw View
In article liu@darkstar.UCSC.EDU, ray@cse.ucsc.edu (Ray Swartz) writes:
>How does the standard currently deal with seeking in a stream?
>
>It used to be using the seekoff function on  a streamoff object.
>
>I've noticed that language implementations use seekg and seekp
>on the stream itself.
>
>What's the current state of the standard?

The IOstream portion of the Commitee working paper is not yet stable.

If you write code that uses the streamoff and streampos types, and
doesn't assume they are numeric types, it will probably continue to
work. Seeking should work in about the same way.
---
Steve Clamage, stephen.clamage@eng.sun.com