大きなファイル(〜1TB)をシークする必要があるifstreamを使用して、C++でプログラムを実装しています。ただし、これは 2GB の読み取り後に失敗します。大きなファイルでも、ファイルの位置を取得する方法はありますか? 32 ビット Windows マシン用にコンパイルします。
std::ifstream f;
f.open( filename.c_str(), std::ifstream::in | std::ifstream::binary );
while(true) {
std::cout << (uint64_t)(f.tellg()) << std::endl;
//read data
}