class A
{
public:
A()
{
B* b = new B();
if (b == NULL)
{
ERROR_CODE = ? // what will be an appropriate error code?
}
}
};
class B
{
public:
uint32 *p;
B()
{
p = new uint32[16];
memset(p, 0x00, 16*sizeof(uint32));
memset(p, 0xFF, 8*sizeof(uint32));
}
};
What will be the appropriate OS error code - invalid_handle, out_of_memory, invalid_operation, or anything else?