S
Sean Bartholomew
size = myTextFile.tellg();
myTextFile.seekg (0, ios::beg);
char buffer[size+1];
myTextFile.read (buffer, size);
myTextFile.close();
buffer[size] = '\0';
the above code works great and always worked great.
now, i tried to apply it to a 27MB text file instead of the 300K one
it was used to doing and i get a fault exception. i am 99% positive
its the size of the file. which makes sense. but my entire program
depends of the buffer containing the entire text for searching and
extraction and parsing purposes.
is there a way around this where i could search direct from the drive
instead of a buffer?
myTextFile.seekg (0, ios::beg);
char buffer[size+1];
myTextFile.read (buffer, size);
myTextFile.close();
buffer[size] = '\0';
the above code works great and always worked great.
now, i tried to apply it to a 27MB text file instead of the 300K one
it was used to doing and i get a fault exception. i am 99% positive
its the size of the file. which makes sense. but my entire program
depends of the buffer containing the entire text for searching and
extraction and parsing purposes.
is there a way around this where i could search direct from the drive
instead of a buffer?