一个类的编程的问题
#include <iostream.h>#include "Myfather.h"
Mysister::Mysister():Myfather(17,100)
{
}
void Mysister::fathertemper()
{
cout<<"she is beautiful"<<endl;
}
Compiling...
Mysister.cpp
e:\master\vc++学习\vc++练习\myfamily\mysister.cpp(6) : error C2653: 'Mysister' : is not a class or namespace name
e:\master\vc++学习\vc++练习\myfamily\mysister.cpp(7) : error C2550: 'Mysister' : constructor initializer lists are only allowed on constructor definitions
e:\master\vc++学习\vc++练习\myfamily\mysister.cpp(10) : warning C4508: 'Mysister' : function should return a value; 'void' return type assumed
e:\master\vc++学习\vc++练习\myfamily\mysister.cpp(12) : error C2653: 'Mysister' : is not a class or namespace name
执行 cl.exe 时出错.
Mysister.obj - 1 error(s), 0 warning(s)
我只是在基类中有个子类Mysister,来编写,报错了啊!找不到愿因。