You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
387 B

#include <iostream>
void foo()
{
char *buf;
try {
buf = new unsigned char[1024];
if( buf == 0 )
throw "Out of memory";
}
catch( char * str ) {
cout << "Exception: " << str << '\n';
}
}
void bar()
{
char *buf;
try
{
buf = new unsigned char[1024];
if( buf == 0 )
throw "Out of memory";
}
catch( char * str )
{
cout << "Exception: " << str << '\n';
}
}