You are allocating about 2.4 to 4.8 megabytes of stack space.
IIRC, the default stack size of MinGW is about 2 MB, i.e. you are exceeding your stack space, and need to increase it -- if, indeed, you want to go with such a large stack allocation instead of e.g. dynamically allocating the memory:
#include <stdlib.h>
int main()
{
gracze * gracz;
if ( ( gracz = malloc( sizeof( gracze ) * 30 ) ) != NULL )
{
// stuff
free( gracze );
}
return 0;
}
If that is not what you are looking for, this SO question covers the "how" of increasing stack space (gcc -Wl,--stack,<size>
).
On Linux, there is also the global limit set by ulimit -s
.
This SuperUser question covers Windows / VisualStudio (editbin /STACK:reserve[,commit] program.exe
).