Similiar, except that there is no finally block. You might write:Quote:
Is it just like java?
Code:try {
int *pointer = functionThatUseNew();
} catch (const std::bad_alloc& e) {
// ...
}
Printable View
Similiar, except that there is no finally block. You might write:Quote:
Is it just like java?
Code:try {
int *pointer = functionThatUseNew();
} catch (const std::bad_alloc& e) {
// ...
}