- Feb 28, 2008
- 1,262
- 0
- 71
Code:
#include <stdio.h>
int main()
{
FILE *to,*from;
from=("g:\\Mess.m2ts","rb");
to=("g:\\Mess2.m2ts","wb");
fopen64 from,to;
fread from;
fwrite to;
return 0;
}
I am attempting to test wether fread and fwrite work as is on a very large file, my google searches have led me to believe that they get messed up with files that are >than 2 GBs.
I wanted to test if this was true and if so get some help for it.
I am attempting to manipulate a very large file in excess of 30GBs and test it under all conditions to make sure that LFS works with my compiler(GCC) or if something else is needed.
Code::Blocks tells me that it is expecting a ';' before fopen64 from,to;
here is the error message C:\Users\Benjamin\Documents\copy.c||In function 'main':|
C:\Users\Benjamin\Documents\copy.c|10|warning: assignment from incompatible pointer type [enabled by default]|
C:\Users\Benjamin\Documents\copy.c|11|warning: assignment from incompatible pointer type [enabled by default]|
C:\Users\Benjamin\Documents\copy.c|12|error: expected ';' before 'from'|
C:\Users\Benjamin\Documents\copy.c|14|error: expected ';' before 'from'|
C:\Users\Benjamin\Documents\copy.c|15|error: expected ';' before 'to'|
||=== Build finished: 3 errors, 2 warnings (0 minutes, 0 seconds) ===|
should I be doing fgets and fputs instead and how do I define and manage a buffer?