社区
C++ 语言
帖子详情
has virtual functions but non-virtual destructor?
guofengzai
2008-04-15 11:27:00
warning: `class LinearList<int>' has virtual functions but non-virtual destructor
这是什么警告啊,怎样去除?
...全文
1268
4
打赏
收藏
has virtual functions but non-virtual destructor?
warning: `class LinearList' has virtual functions but non-virtual destructor 这是什么警告啊,怎样去除?
复制链接
扫一扫
分享
转发到动态
举报
AI
作业
写回复
配置赞助广告
用AI写文章
4 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
yczala
2008-07-07
打赏
举报
回复
不是可以自动生成析构函数吗?
daohua
2008-04-16
打赏
举报
回复
[Quote=引用 1 楼 Thorwein 的回复:]
没有析构。
[/Quote]
lzr001
2008-04-15
打赏
举报
回复
析构函数增加virtual
Thorwein
2008-04-15
打赏
举报
回复
没有析构。
Selected.Topics.in.Cplusplus.15117
Then you have
virtual
function
s and
virtual
tables and
virtual
pointers. When you know these core concepts C++ becomes a powerful language to use because you can control your program to do exactly ...
Google C++ Style Guide(Google C++编程规范)高清PDF
We can declare (but not define)
function
s with arguments, and/or return values, of type Foo. (One exception is if an argument Foo or const Foo& has a
non
-explicit, one-argument constructor, in which ...
FlexGraphics_V_1.79_D4-XE10.2_Downloadly.ir
- FIX TTreeInspector.FDelimBmp don't removed in
destructor
. - FIX TFlexPanel.FIsOverSegment flag take into account now the pen width. - ADD TFlexEllipse.Center - read-only public property. - FIX Trial...
Android12之oboe报错: has
virtual
function
s but
non
-
virtual
destructor
(一百四十)
Android12之oboe报错: has
virtual
function
s but
non
-
virtual
destructor
delete called on
non
-final ‘xxx‘ that has
virtual
function
s but
non
-
virtual
destructor
warning: delete called on
non
-final 'xxx' that has
virtual
function
s but
non
-
virtual
destructor
因为类中有纯虚函数。 只要纯虚函数, 就必须要虚析构函数。 所以解决办法就是在原类中定义虚析构函数。 ...
C++ 语言
65,186
社区成员
250,526
社区内容
发帖
与我相关
我的任务
C++ 语言
C++ 语言相关问题讨论,技术干货分享,前沿动态等
复制链接
扫一扫
分享
社区描述
C++ 语言相关问题讨论,技术干货分享,前沿动态等
c++
技术论坛(原bbs)
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
请不要发布与C++技术无关的贴子
请不要发布与技术无关的招聘、广告的帖子
请尽可能的描述清楚你的问题,如果涉及到代码请尽可能的格式化一下
试试用AI创作助手写篇文章吧
+ 用AI写文章