您的位置:首页 > 其它

Compiler Warning C4150: deletion of pointer to incomplete type 'XXX'; no destructor called

2008-06-03 15:24 525 查看
Lookatthefollowingcodes:

//C4150.cpp
//compilewith:/W2
classIncClass;

voidNoDestruct(IncClass*pIncClass)
{
deletepIncClass;
}//C4150,defineclasstoresolve
Reason:
ThecompilerwarningisbecausethecompilerwasunabletofindthetypeIncClass'sdestructor.
Solution:
PuttheimplementationofIncClasstoheaderfileandincludethefileinthisCPP.



                                            
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐