错误消息
数组的总大小不得超过 0x7fffffff 字节数组超出该限制。减小数组大小。
示例
下面的示例生成 C2148:
// C2148.cpp
#include
#include
int main( ) {
char MyArray[0x7ffffffff]; // C2148
char * MyArray2 = (char *)malloc(0x7fffffff);
if (MyArray2)
printf_s("It worked!");
else
printf_s("It didn't work.");
}