Reading files larger than 4GB using c++ stl

后端 未结 5 1026
离开以前
离开以前 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:22

    Apparently it depends on how off_t is implemented by the library.

    #include 
    __int64_t temp=std::numeric_limits::max();
    

    gives you what the current max is.

    STLport supports larger files.

提交回复
热议问题