// 32_32-5.cpp : コンソール アプリケーションのエントリ ポイントを定義します。
//

#include "stdafx.h"
#include <iostream>
#include <windows.h>

using namespace std;

int _tmain(int argc, _TCHAR* argv[])
{
	double *p1;

	cout << "start\n";
	try {
		for (int n = 1; n <= 100; n++) {
			p1 = new double[0xFFFFFFF];	// 確保できない
		}
	}
	catch (bad_alloc) {
		cout << "メモリ確保できません。\n";
	}
	cout << "end.\n";

	MessageBox(NULL, _T("Check Console Window"), L"MessageBox", MB_OK);

	return 0;
}

