Possible Duplicate:
What is a stack overflow error?
It just happens when I declare large arrays with the size of 4096*1024
First-chance exception at 0x01382e97 in nsfclient.exe: 0xC00000FD: Stack overflow.
Unhandled exception at 0x01382e97 in nsfclient.exe: 0xC00000FD: Stack overflow.
What should I do to be able to declare big arrays in Visual Studio?
You should explicitly increase the stack size to be able to store bigger arrays on the stack. As far as I remember this is done using the
/Foption.Another option would be to use dynamic arrays(allocated using
mallocornew).EDIT(thanks to Jefrrey Theobald): you will also have to increase the stack size in the linker, which is done using the

/stackoption. This option can also be set by right-click on the project->properties->linker->system andsetting stack commitandstack reserve size.