Answer:
#include<new>
using std: :bad_alloc;
char* function ( int size )
{
try
char *p = new char [ size ] ;
return p ;
}
catch ( bad_alloc )
return NULL;
} // end function
3.7m questions
4.8m answers