maanoo/blog
Friday, November 4, 2016
C++: New keyword exceptions
When new is used, a bad_alloc can be thrown. To return null pointer on error instead of the exception a second format can be used:
Site *maanoo = new (std::nothrow) Site("maanoo.com");
done_
Newer Posts
Older Posts
Home
Subscribe to:
Posts (Atom)