这是《C++语言程序设计 习题与实验指导》 郑莉主编 清华大学出版社出版 P32的4-8
我用怎么也调试不出来太可恶了,请高用们指点。
错误是error C2572: 'dog::dog' : redefinition of default parameter : parameter 2
        E:\data\vcs\cpp48.cpp(5) : see declaration of 'dog::dog'
程序如下: 
# include <iostream.h>
class dog
{
public:
dog(int initialage=0,int initialweight=5);
~dog();
int getage(){return itsage;}
void setage(int age){itsage=age;}
int getweight(){return itsweight;}
void setweight(int weight){itsweight=weight;}
private:
int itsage,itsweight;
};dog::dog(int initialage=0,int initialweight=5)
{
itsage=initialage;
itsweight=initialweight;
}
dog::~dog()
{
}int main()
{
dog Jack(2,10);
cout<<"Jack is a dog who is";
cout<<Jack.getage()<<"years old and";
cout<<Jack.getweight()<<"pounds weight.\n";
Jack.setage(7);
Jack.setweight(20);
cout<<"Now Jack is";
cout<<Jack.getage()<<"years old and";
cout<<Jack.getweight()<<"pounds weight.";
return 0;
}