C
cooldisk
Is it possible at all to read a binary file larger than 2GB on a 32-
bit system? I tried the following:
#include <iostream>
#include <fstream>
using namespace std;
int main(int argc, char *argv[]) {
fstream fsBin;
fsBin.open(argv[1], fstream::in | fstream::binary);
if (! fsBin) {
cerr << "File " << argv[1] << " cannot be opened.\n";
exit(1);
}
fsBin.close();
return 0;
}
When I ran this program to open a file of 4.4GB size, I got: "File foo
cannot be opened."
Help? Thanks!
-Joe
bit system? I tried the following:
#include <iostream>
#include <fstream>
using namespace std;
int main(int argc, char *argv[]) {
fstream fsBin;
fsBin.open(argv[1], fstream::in | fstream::binary);
if (! fsBin) {
cerr << "File " << argv[1] << " cannot be opened.\n";
exit(1);
}
fsBin.close();
return 0;
}
When I ran this program to open a file of 4.4GB size, I got: "File foo
cannot be opened."
Help? Thanks!
-Joe