Click here to Skip to main content
16,015,481 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: PLEASE HELP ME Pin
Christian Graus4-Apr-02 22:58
protectorChristian Graus4-Apr-02 22:58 
GeneralRe: PLEASE HELP ME Pin
Tomasz Sowinski5-Apr-02 6:02
Tomasz Sowinski5-Apr-02 6:02 
GeneralVery Basic Question. Pin
Mazdak4-Apr-02 20:14
Mazdak4-Apr-02 20:14 
GeneralRe: Very Basic Question. Pin
Joaquín M López Muñoz4-Apr-02 20:28
Joaquín M López Muñoz4-Apr-02 20:28 
GeneralRe: Very Basic Question. Pin
Mazdak4-Apr-02 20:34
Mazdak4-Apr-02 20:34 
GeneralRe: Very Basic Question. Pin
Joaquín M López Muñoz4-Apr-02 20:44
Joaquín M López Muñoz4-Apr-02 20:44 
GeneralRe: Very Basic Question. Pin
Mazdak4-Apr-02 20:54
Mazdak4-Apr-02 20:54 
GeneralRe: Very Basic Question. Pin
Joaquín M López Muñoz4-Apr-02 21:08
Joaquín M López Muñoz4-Apr-02 21:08 
Ok, now I got it. Well, stdio.h IO is basically limited to 32-bit sizes (see for instance fseek), so files greater than 4GB might be a little hard to deal with. You have the following options:
  1. Ignore files greater than 4GB (they're truly exceptional, after all) and just truncate the ULONGLONG values to fit into a size_t.
  2. Read the file in moderately sized chunks. I'd do it this way unless you absolutely need to have all the file contents in one big buffer.
  3. Try dividing the total amount of bytes between parameters size and count. For instance,
    fread(pb,0xFFFFFFFF,0xFFFFFFFF,fp)
    should read (232-1)(232-1)~264 bytes. I'm not sure this will work though. Also, please note you're gonna have trouble allocating such a monster buffer.


Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
GeneralRe: Very Basic Question. Pin
Mazdak4-Apr-02 21:24
Mazdak4-Apr-02 21:24 
GeneralRe: Very Basic Question. Pin
Niklas L4-Apr-02 21:08
Niklas L4-Apr-02 21:08 
GeneralRe: Very Basic Question. Pin
Mazdak4-Apr-02 21:22
Mazdak4-Apr-02 21:22 
GeneralRe: Very Basic Question. Pin
PJ Arends4-Apr-02 21:11
professionalPJ Arends4-Apr-02 21:11 
GeneralRe: Very Basic Question. Pin
Mazdak4-Apr-02 21:19
Mazdak4-Apr-02 21:19 
GeneralRe: Very Basic Question. Pin
Jon Hulatt4-Apr-02 21:34
Jon Hulatt4-Apr-02 21:34 
GeneralSplit strigs to substrings Pin
Nektarios Sourligas4-Apr-02 20:00
Nektarios Sourligas4-Apr-02 20:00 
GeneralRe: Split strigs to substrings Pin
Mazdak4-Apr-02 20:08
Mazdak4-Apr-02 20:08 
GeneralRe: Split strigs to substrings Pin
Nektarios Sourligas4-Apr-02 20:24
Nektarios Sourligas4-Apr-02 20:24 
GeneralRe: Split strigs to substrings Pin
Mazdak4-Apr-02 20:45
Mazdak4-Apr-02 20:45 
GeneralRe: Split strigs to substrings Pin
Mazdak4-Apr-02 20:47
Mazdak4-Apr-02 20:47 
GeneralRe: Split strigs to substrings Pin
Joaquín M López Muñoz4-Apr-02 20:24
Joaquín M López Muñoz4-Apr-02 20:24 
GeneralRe: Split strigs to substrings Pin
Paul M Watt4-Apr-02 20:34
mentorPaul M Watt4-Apr-02 20:34 
GeneralRe: Split strigs to substrings Pin
Nektarios Sourligas4-Apr-02 22:45
Nektarios Sourligas4-Apr-02 22:45 
GeneralRe: Split strigs to substrings Pin
Paul M Watt4-Apr-02 23:24
mentorPaul M Watt4-Apr-02 23:24 
GeneralRe: Split strigs to substrings Pin
Michael Dunn5-Apr-02 16:42
sitebuilderMichael Dunn5-Apr-02 16:42 
GeneralCOM Pin
4-Apr-02 17:51
suss4-Apr-02 17:51 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.