I agree with everyone else that you should use exceptions, but if you do really need to use NULL for some reason, make the constructor private and use a factory method:
static CMyClass* CMyClass::create();
This means you can't construct instances normally though, and you can't allocate them on the stack anymore, which is a pretty big downside.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…