共用方式為


streampos

承擔緩衝區指標或檔案指標的目前位置。

typedef fpos<mbstate_t> streampos;

備註

此型別是 fposmbstate_t>同義字。<

範例

// ios_streampos.cpp
// compile with: /EHsc
#include <iostream>
#include <fstream>

int main( ) 
{
   using namespace std;

   ofstream x( "iostream.txt" );
   x << "testing";
   streampos y = x.tellp( );
   cout << y << endl;
}
7

需求

標題: <ios>

命名空間: std

請參閱

參考

fpos 類別

iostream 程式設計

iostreams 慣例

其他資源

fpos 成員

<ios> 成員