共用方式為


streambuf::getpos Method

Gets the current read or write position in the stream.

virtual typename details::basic_streambuf<_CharType>::pos_type getpos(
   std::ios_base::openmode direction
) const;

Parameters

  • direction
    The I/O direction to seek (see remarks)

Return Value

The current position. EOF if the operation fails.

Remarks

Some streams may have separate write and read cursors. For such streams, the direction parameter defines whether to move the read or the write cursor.

Requirements

Header: astreambuf.h

Namespace: concurrency::streams

See Also

Reference

streambuf Class