unexpected end of file found
#include<iostream>using namespace std;
class father
{
private:
int fatherheight,fatherweight;
public:
void setfatherheight(int fatherheight){fatherheight=fatherheight;
void setfatherweight(int fatherweight){fatherweight=fatherweight;
void Showfatherheight()
{
cout<<"height="<<fatherheight<<"\t"<<"weight="<<fatherweight<<endl;
}
};
class son: public
{
private:
int sonwidth,sonlength;
public :
void setwidth(int sonwidth){sonwidth=sonwidth;}
void setlength(int sonlength){sonlength=sonlength;}
void Showsondate(){cout<<"length="<<sonlength<<"\t"<<"width="<<sonwidth<<endl;
};
int main()
{
son a;
a.setfatherheight(160);
a.setfatherweight(60);
a.setsonwidth(60);
a.setsonlength(80);
a.Showfatherheightweight();
a.Showdatesondate();
return 0;
}
好像没错误吧,不知道错在哪,郁闷