写了一个继承的初级小程序,但是程序报错运行不出来,求前辈指教!

#include "iostream"
#include "cstring"

using namespace std;

class Cstudent
{
private:
string name;
int age;
string gender;

public:
void Outputinfo()
{
cout<<"Name: "<<name<<endl;
cout<<"Age: "<<age<<endl;
cout<<"Gender: "<<gender<<endl;
};

void Setinfo (const string & name_, const int& age_, const string& gender_);

string Getname() {return name;}

};

class Cgraduatestudent: public Cstudent{
private:
string leader;
public:
void giveBaoYan()
{
cout<<" was given Baoyan!!"<<endl;
}

void Outputinfo()
{
    Cstudent::Outputinfo();
    cout<<"leader is: "<<leader<<endl;
}


void Setinfo(const string & name_, const int& age_, const string& gender_, const string& leader_)
{
    Cstudent::Setinfo(name_, age_, gender_);
    leader = leader_;
}

};

int main ()
{
Cgraduatestudent Derek;
cout<<"please the information: "<<endl;
Derek.Setinfo("Derek",23,"male","Tony");
Derek.Getname();
Derek.giveBaoYan();
cout<<"the information is : "<<endl;
Derek.Outputinfo();
}

你少定义了一个Cstudent的成员函数
void Cstudent::Setinfo(const string& name_,const int& age_,const string& gender_)
{
name = name_;
age = age_;
gender = gender_;
}
加上这个就行了

以下是报错内容的截图:
谢谢!
图片说明

你的Cgraduatestudent类中重载了CStudent类中的Setinfo()函数,但是你的Cstudent类中的这个setinfo函数却不是虚函数,怎么能重载呢!所以会报错啊!