simple array cause exception

前端 未结 4 1181
孤独总比滥情好
孤独总比滥情好 2020-12-12 02:46
#include \"stdafx.h\"

int _tmain(int argc, _TCHAR* argv[])
{
    float x[1000][1000];

    return 0;
}

I get \" First-chance exception at 0x013416

4条回答
  •  没有蜡笔的小新
    2020-12-12 03:17

    float is 4 bytes, so 4 * 1000 * 1000 = 4 megabytes.

    "stack size defaults to 1 MB"

    See here: http://msdn.microsoft.com/en-us/library/tdkhxaks(v=VS.100).aspx

提交回复
热议问题