Declaration terminated incorrectly这个错误代码是什么意思呀.
//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;
grand_cayman package_2;
st_thomas package_3;
ptr=&islands;
ptr->other_attractions();
ptr=&package_1;
ptr->other_attractions();
ptr=&package_2;
ptr->other_attractions();
ptr=&package_3;
ptr->other_attractions();
return(0);
// 第76行
}
*error [color=DarkOrange]16_5.cpp 76 Declaration terminated incorrectly[/color]
[[italic] 本帖最后由 yiming313140172 于 2007-12-15 18:09 编辑 [/italic]]