Reading files larger than 4GB using c++ stl

后端 未结 5 1031
离开以前
离开以前 2020-12-03 02:04

A few weeks back I was using std::ifstream to read in some files and it was failing immediately on open because the file was larger than 4GB. At the time I couldnt find a de

5条回答
  •  青春惊慌失措
    2020-12-03 02:06

    I ran into this problem several years ago using gcc on Linux. The OS supported large files, and the C library (fopen, etc) supported it, but the C++ standard library didn't. I turned out that I had to recompile the C++ standard library using the correct compiler flags.

提交回复
热议问题