How to write data in >4GB file with C++?

前端 未结 4 1900
傲寒
傲寒 2021-02-06 08:24

I\'m trying to write a large file, but ran into a problem.

I use long long for seeking a place to write, but can\'t write file more than 4,2Gb. What I forgot?

Mo

4条回答
  •  轮回少年
    2021-02-06 09:07

    There is a nice summary for Linux here:

    http://www.suse.de/~aj/linux_lfs.html

    And more specific detail from RedHat targetting RHEL, these problems are generally for 32-bit applications accessing 64-bit sized files.

    http://people.redhat.com/berrange/notes/largefile.html

    Wikipedia actually has an artile on Large File Support but not really that informative.

提交回复
热议问题