Mail Archives: djgpp/1997/05/24/10:47:56
"Daniel Krenn" (dkrenn AT usa DOT net) writes:
> From: Jeroen Cranendonk <crandonk AT doge DOT nl>
> The next sniplet of code keeps giving large error messages, is there
> something that one shouldn't be doing in it, any help would be greatly
> appreciated.
>
> /////////////code//////
> struct Rectangle
> {
> int x1,y1,x2,y2;
> };
>
> class FOO
> {
> protected:
> Rectangle dakp[100];
> };
>
> main()
> {
> FOO Crash[200]; // 100 and it does'nt crash
> return(0);
> }
>
> ////////fini//////////////
> i'm using djgpp 2.?? , dos or win95 , rhide , 64mb ram , pentium , load
> of harddisk .
> it gives an error before it exits ( returns 255 , not 0 , and gives a
> load of text)replys please by e-mail ( and newsgroup for the benefit of
> others, but i won't find it there)
You are putting 320000 bytes on the goddamned stack! Try static FOO
Crash[200];
Or, stubedit the stack bigger.
(I guess the stack is more than 160000 but less than 320000 bytes by default?)
--
.*. Where feelings are concerned, answers are rarely simple [GeneDeWeese]
-() < When I go to the theater, I always go straight to the "bag and mix"
`*' bulk candy section...because variety is the spice of life... [me]
Paul Derbyshire ao950 AT freenet DOT carleton DOT ca, http://chat.carleton.ca/~pderbysh
- Raw text -