vc++ 2005 unhandled exception error: settings

F

farshid.roumi

I was able to solve the problem in vc++5 by changing the vc++
settings. ButI can't find the same options in vc++ 2005. I have a lot
of big arrays! "Unhandled exception at 0x0040c247 in jan7.exe:
0xC0000005: Access violation reading location 0x00030000."
 
P

peter koch

(e-mail address removed) skrev:
I was able to solve the problem in vc++5 by changing the vc++
settings. ButI can't find the same options in vc++ 2005. I have a lot
of big arrays! "Unhandled exception at 0x0040c247 in jan7.exe:
0xC0000005: Access violation reading location 0x00030000."

Lucky you! I bet there is an option to make your program enter the
debugger. In that case you can examine the fault, correct it and
finally get a working program.

/Peter
 
T

Thomas J. Gritzan

I was able to solve the problem in vc++5 by changing the vc++
settings. ButI can't find the same options in vc++ 2005. I have a lot
of big arrays! "Unhandled exception at 0x0040c247 in jan7.exe:
0xC0000005: Access violation reading location 0x00030000."

Why do you think that you need more memory? The OS gives your programm all
memory when you use new or malloc().
However, the stack space is limited. If you have huge arrays that use
automatic storage, then that might be your problem.

Compiler options to increase the stack space are offtopic here and best
asked in a compiler specific newsgroup.

Instead, you can allocate your arrays on the free store where you can have
larger arrays without problems:

#include <vector>

void function()
{
std::vector<int> v(1000);
// instead of: int v[1000];
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,228
Members
46,818
Latest member
SapanaCarpetStudio

Latest Threads

Top