托管 C++错误 2504 错误
我是托管 C++ 的新手,我正在尝试设计一个演示程序。我试图让一个类继承 ABC,但收到错误 C2504。有问题的代码如下:
ref class Item : Auction //Error C2504 here {
//Auction 类的更多代码在不同的 .h 文件中定义。
如果还有任何其他问题或者您需要查看更多代码,请告诉我。
谢谢
I'm new to managed c++ and I'm attempting to design a program for a presentation. I am attempting to have a class inherit from an ABC and I'm getting the Error C2504. The code in question is as follows:
ref class Item : Auction //Error C2504 here
{
//More code for the class Auction is defined in a different .h file.
Let me know if there are any other questions or if you need to see more of the code.
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
此时尚未定义
Auction
,猜测您没有将其包含在出现错误的文件(或其头文件)中。来自 http://msdn.microsoft.com/en-我们/库/dw443zc0(VS.71).aspx
Auction
hasn't been defined at that point, at a guess you're not including it in the file where you're seeing the error (or it's header file).From http://msdn.microsoft.com/en-us/library/dw443zc0(VS.71).aspx
修复了它...在拍卖之前忘记了公开,所以它默认为私有继承...Doh!
Fixed it... Forgot public before Auction so it was defaulting to private inheritance... Doh!