C++菜鸟问题
#include <iostream>using namespace std;
class Human
{
public :
void GetStature(){cout<<stature;}
void GetWeight(int x){stature=x;}
void get_weight();
void setweight(int x);
private:
int stature;
int geight;
};
Human::get_weight()
{
cout<<geight;
}
void setweight(int x)
{
geight=x;
}
void main()
{
Human Mike;
int y;
cin>>y;
Mike.GetWeight(y);
Mike.GetStature();
cout<<endl;
Mike.setweight(80);
cout<<"Mike的体重是:"
Mike.get_weight();
}
//请问哪里错了?