Hi guys,

Sorry for the newbie question...

I dynamiclly allocate memory in OnInitDialog and I check if it failed using try & catch.

My question is what should I do when the it fails??

currently I am using:

Code:
try
	{
		int *pNum = int;
	}
	catch (std::bad_alloc&) 
	{
		EndDialog(0);
		return FALSE:
	}

..
..
..
More code
..
..
..
Is that the right way to do it??

Many thanks