|
//test 16_5.cpp
//这是一个虚函数示例,我原封不动的写入.结果就是编译不了.系统提示错误在第76行.求各位大侠帮忙!#include <iostream.h>
class caribbean
{
public:
virtual void other_attractions(void)
{
cout<<" .........";
}
};
class bahamas:public caribbean
{
public:
void other_attractions(void)
{
cout........";
}
};
class grand_cayman:public caribbean
{
public:
void other_attractions(void)
{
cout,,,,,, };
class st_thomas:public caribbean
{
public:
void other_attractions(void)
{
cout<<" ..........
};
main(void)
{
caribbean islands,*ptr;
bahamas package_1; |
|