Share via


streambuf::seekoff 方法

搜尋至相對位移指定的位置。

virtual typename details::basic_streambuf<_CharType>::pos_type seekoff(
   typename details::basic_streambuf<_CharType>::off_type offset,
   std::ios_base::seekdir way,
   std::ios_base::openmode mode
);

參數

  • offset
    搜尋到的相對位置

  • way
    搜尋的起始點 (啟動、結尾、目前)。

  • mode
    要搜尋的 I/O 方向 (請參閱<備註>)

傳回值

位置。 如果作業失敗,則為 EOF。

備註

某些資料流可能有不同的寫入和讀取資料指標。 對於這類資料流,模式參數會定義要移動讀取資料指標還是寫入資料指標。

需求

**標頭:**astreambuf.h

**命名空間:**concurrency::streams

請參閱

參考

streambuf 類別