None of this stuff is standard. You'll need to check your compiler's documentation. In some cases fread and fwrite work just fine once you've opened a file with fopen64. In other cases you'll need to use some special functions and/or variables. Sometimes the fseek and ftell functions are modified instead.
Alas, this is all I know about it (having never used it myself).
I suppose you could, but you really have no valid reason to go dinking around with the standard library. (You'll break all kinds of stuff.)
You still haven't told us what system you are using. Have you looked it up in your system/compiler's documentation?
You are doing non-standard stuff. Even so, that stuff was written to be used a certain way. Less grief comes from doing it the recommended (i.e. documented) way. That is, use the functions given you the way they are supposed to be used.
Not exactly edit the whole fread and fwrite in the standard library. Creating an interface that would correspond to the fread64 and fwrite64 would do. I'm using g++ version 4.0+ compiler, I'm doing it in linux. I think g++ does not support it.
> I should define _LARGEFILE_SOURCE and _LARGEFILE64_SOURCE to the .cpp files where I use fread and fwrite?
yes, if you want to use files of sizes beyond the usual limit of 2GB on 32 bit systems. see the documentation for these macros http://www.delorie.com/gnu/docs/glibc/libc_13.html
if you are on linux, you also need to have these and -D_FILE_OFFSET_BITS=64 when you compile the kernel. eg.