|
|
От: | Studentus | |
| Дата: | 24.08.06 10:35 | ||
| Оценка: | |||
#include "stdafx.h"
#include <iostream>
void foo()throw()
{
new double[0xfffffff];
}
int _tmain(int argc, _TCHAR* argv[])
{
try{
for(int i = 0; i < 20; i++)
foo();
}
catch (std::bad_alloc) {
std::cout << "bad::alloc";
}
return 0;
}