c++程序为何编译不过?
程序代码:#include <iostream>
using namespace std;
class test{
public:
void print()
{
cout<<"health tooth"<<endl;
}
};
class obj:public test{
public:
void print()
{
cout<<"bad tooth"<<endl;
}
};
int main()
{
test* point= &obj;
(obj*)point->print();
}






