|
-
April 19th, 2003, 06:45 PM
#1
Open with very large files
Hi
I get the following message as I start to read data from a very large 25M ascii chars file.
First-chance exception in MyApp.exe: 0xC00000FD: Stack Overflow.
It seems to work on much smaller files.
code fragment is
if( In->Open( dialg->GetPathName(), CFile::modeRead ) )
{
// Temporary buffer.
// Get the input file size so we know when we're done reading.
nFilesize = In->GetLength();
// read a block of data 4000 chars
int nsize=ReadData();
// crashes on entry to this next routine
GetData(nsize);
}
any suggestions
thanks
-
April 19th, 2003, 09:24 PM
#2
Is there a reason you need a recursive approach? It seems to be a loop will do just fine.
-
April 20th, 2003, 04:29 AM
#3
Just call out CFile::Read method passing it a pointer to hold data large enough you need!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|