C++错误修改
#include "stdafx.h"#include<iostream>using namespace std;class X1{protected: int x;public: X1(int xx){x=xx;} void output() { cout<<"x=&q... 展开
其他答案
#include<iostream.h>class X1{protected: int x;public: X1(int xx){x=xx;} virtual void output()//这里也要标注virtual { cout<<"x="<<x;}};class Y1:public X1//应该用public继承{ int y;pub 展开
2010-12-17 16:29
来自北京市
赞(0)点赞赞(0)举报
免责声明:问答内容均来源于互联网用户,房天下对其内容不负责任,如有版权或其他问题可以联系房天下进行删除。




