Subj : Re: Win98 error To : borland.public.cpp.borlandcpp From : waking@idirect.com (Wayne A. King) Date : Fri Mar 12 2004 09:29 am On Thu, 11 Mar 2004 21:27:14 -0500, Les Hurley wrote: >When I set nmax to 93 or less everything is fine. >If I change the double in the struct to float then nmax can be up to 190. >I guess it has something to do with the amount of >memory available in EasyWin. Stack size issue. Local automatic arrays are created on the stack. If you made the P and R arrays global by moving them outside of main (at file scope), or by using the "static" keyword they would be created in the data segment instead of on the stack. If you created them by using new or malloc/calloc they would be created on the heap/store. Two arrays of 100 doubles requires twice as much space as two arrays of 100 floats. Hence twice the demand on the stack. Make sure you have the option set to check for stack overflow. For EasyWin programs the stack size is determined by the .DEF file for the project. If you haven't created a .DEF file for the program then the values from DEFAULT.DEF are used. However, in BC++ 5.01 the HEAPSIZE and STACKSIZE entries are commented out (via a comma at the beginning) in the shipped default.def file. You must uncomment those entries when building an EasyWin program. The recommended STACKSIZE of 8192 may be minimal. If problems persist or return as the program grows, increase it to 16384. -- Wayne A. King (waking@idirect.com, Wayne_A_King@compuserve.com) .