/ Published in: C++
![](/img/icon_sav.png?v3)
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
using namespace std; int main() { char *buf; try { buf = new char[512]; if( buf == 0 ) throw "Memory allocation failure!"; } catch( char * str ) { cout << "Exception raised: " << str << '\n'; } // ... return 0; }
Comments
![RSS Feed for Comments RSS Icon](/images/rss.png?v3)