Главная страница | назад





Article #15734: Large arrays and EasyWin

 Question and Answer Database
FAQ734C.txt Large arrays and EasyWin
Category :C/C++ Language Issues
Platform :Windows 3.1
Product : BC++4.5x BC++5.x TC++Win4.5
Question:
Hi, I've done a program that needs an integer array with 5000
elements. I compile the source but when I execute the program
crashes. I've tried to change the memory model, the stack size
and the heap size in 'default.def' but it still doesn't work.
I've tried do run this program and the same happened.
#include 
main()
{
int register i;
int x[5000];
for (i=0;i<5000;i++)
x[i]=1000;
return 0;
}
I'm using BC++ 4.52
Can you help me with this? Thanks.
Answer:
It sounds like you're using EasyWin. If that's the case, you've
run into a limitation of EasyWin. Either allocate your memory
dynamically or use a DOS (Standard) Target or Win32 Console
program if you're under 95 or NT. It will work in each of
those cases.
7/2/98 10:32:32 AM

Last Modified: 01-SEP-99