无法实例化抽象类 [英] cannot instantiate abstract class

查看:188
本文介绍了无法实例化抽象类的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在更新活动的x控件的界面.它具有双重接口.我已经手动更新了odi文件,对其进行了编译,并将新方法添加到共同类和双重接口中.在编译时,出现错误由于成员无法实例化抽象类Cobject :: XObject ---新添加的成员列表".我已经检查了更新的调度和双重地图,并为两者添加了方法.但是仍然存在编译错误吗?

I am updating interface of an active x control. It has dual interface. I have manually updated the odi file, compiled it, and added the new methods to co-class and dual interface. On compilation , I get the error ''cannot instantiate abstract class Cobject::XObject due to members --- list of newly added members''. I have checked having updated dispatch & dual maps and added methods for both. But still compilation error remains?

推荐答案

检查调用约定,参数等.一切都必须与预期的方法签名相匹配.

问候
Espen Harlinn
check calling convention, parameters and so on. everything must match the expected method signatures.

Regards
Espen Harlinn


不能实例化抽象类.您必须从中派生一个新类,并在其中实现所有纯虚函数,然后改用新类.

这是基本的C ++东西...
An abstract class cannot be instantiated. You MUST derive a new class from it, and implement all of the pure virtual functions in it, and then use the new class instead.

This is basic C++ stuff...


这篇关于无法实例化抽象类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆