Static array size limit

simendsjo simen.endsjo at pandavre.com
Sat Apr 2 06:50:27 PDT 2011


I think you missed my "/int.sizeof" at the end.

enum size = (16*1024*1024)/int.sizeof;
int[size] a; // "Error index overflow for static" as expected
int[size-1] b; // stack overflow
int[250_001] c; // stack overflow
int[250_000] d; // ok


More information about the Digitalmars-d-learn mailing list