c++ new bad_alloc
try
{
for (int i = 0; i<1000; i++)
{
test1 = new Test();
cout << i << " new dog success..." << endl;
}
}
catch (bad_alloc err)
{
cout << "fail:"<<err.what()<< endl;
}
QQ 3087438119
try
{
for (int i = 0; i<1000; i++)
{
test1 = new Test();
cout << i << " new dog success..." << endl;
}
}
catch (bad_alloc err)
{
cout << "fail:"<<err.what()<< endl;
}