Handling large files > 4 GB

Discussion in 'C++' started by Michael, Jun 22, 2004.

  1. Michael

    Michael Guest

    X-Replace-Address

    Hello,

    I am trying to write a program at work for reading/writing files
    larger than 4 GB. I know that Windows supports files that big but I
    have not been able to get my program to write past the 4 gig boundary.


    Some solutions that I have tried:
    * standard library: fstream/write
    * MS's CreateFile()/WriteFile()
    * fopen/fwrite


    I found a page http://www.ece.utexas.edu/~luo/linux_lfs.html that
    describes large file support for Linux. Is there an equivalent under
    Windows?

    I would prefer a portable solution, but will settle for anything that
    will work on Windows 2000. BTW, I am using Borland C++ Builder 6.0
    for my compiler.

    Thanks in advance for any help,
    Michael

    mwithNNam.yahNNoo@com (NOSPAM: remove NN's and swap @ & . to e-mail
    me)
     
    Michael, Jun 22, 2004
    #1
    1. Advertising

  2. Michael

    Pete C. Guest

    Michael wrote:
    > X-Replace-Address
    >
    > Hello,
    >
    > I am trying to write a program at work for reading/writing files
    > larger than 4 GB. I know that Windows supports files that big but I
    > have not been able to get my program to write past the 4 gig boundary.
    >

    <snip>

    Standard C++ (the topic of this group) does not define any file size limits,
    so you need to ask in a group for your platform. In your case,
    comp.os.ms-windows.programmer.win32.

    - Pete
     
    Pete C., Jun 23, 2004
    #2
    1. Advertising

  3. Michael

    Michael Guest

    "Pete C." <> wrote in message news:<q75Cc.14673$>...
    >
    > Standard C++ (the topic of this group) does not define any file size limits,
    > so you need to ask in a group for your platform. In your case,
    > comp.os.ms-windows.programmer.win32.
    >
    > - Pete


    Thank you for your reply. So that means that streampos's size (the
    type used by tellg() and seekg()) is defined by the implementation,
    not the Standard?

    Sorry for being off topic,
    Michael
     
    Michael, Jun 23, 2004
    #3
  4. Michael

    Pete C. Guest

    Michael wrote:
    > "Pete C." <> wrote in message
    > news:<q75Cc.14673$>...
    >>
    >> Standard C++ (the topic of this group) does not define any file size
    >> limits, so you need to ask in a group for your platform. In your
    >> case, comp.os.ms-windows.programmer.win32.
    >>
    >> - Pete

    >
    > Thank you for your reply. So that means that streampos's size (the
    > type used by tellg() and seekg()) is defined by the implementation,
    > not the Standard?
    >
    > Sorry for being off topic,
    > Michael


    Yes, it's implementation defined. Note that questions about whether some is
    or not /is/ on-topic. :)

    - Pete
     
    Pete C., Jun 23, 2004
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. boomer

    Large files handling

    boomer, Nov 9, 2003, in forum: XML
    Replies:
    1
    Views:
    375
    Andy Dingley
    Nov 10, 2003
  2. BrianJones
    Replies:
    2
    Views:
    405
    John Harrison
    Jul 23, 2004
  3. Robert Kochem
    Replies:
    1
    Views:
    378
    Arne Vajhøj
    Apr 29, 2010
  4. thufir
    Replies:
    3
    Views:
    237
    Thufir
    Apr 12, 2008
  5. Replies:
    18
    Views:
    240
Loading...

Share This Page