К списку форумов К списку вопросов
Stack overflow
alexey galkin
16.10.2004 - 15:33
Visual C++ 6.0 простенькая програмка вызывает exception: stack overflow
внимание вопрос: а какие собственно допустимые ограничения на размер массивов?
#inсludе <fstream.h>
#inсludе <string.h>
const long ln=2222222;
const long lnsub=111111;
int main()
{
 char sub[lnsub], s[ln];
}
Тигренок
1 - 16.10.2004 - 16:37
---MSDN - Visual C++ Linker Options----
The /STACK option sets the size of the stack in bytes. This option is only for use when building an .exe file.
This option specifies the total stack allocation in virtual memory. The default stack size is 1 MB. The linker rounds up the specified value to the nearest 4 bytes.
-------
ты же пытаешься создать в стеке массив больше 2Мб.

К списку вопросов на форуме Программирование

>>