子类与父类输出操作符重载出错

下面代码中两个输出运算符重载无法实现,应该怎么解决

#include<iostream>
#define defaultValue "0"
using namespace std;
class Person{
protected:
    string m_strName;
public:
    Person() { cout << "Person constructing" << endl; }
    ~Person() { cout << "Person destructing" << endl; }
    Person(const string&);
    friend ostream& operator<<(ostream&, const Person&);
    friend istream& operator>>(istream&, Person&);
};

class Student:public Person {
    static int m_nLastID;
public:
    Student() {
        cout << "Student constructing" << endl;
        m_strSID = ++m_nLastID; 
    }
    ~Student(){ cout << "Student destructing" << endl; }
    Student(const string&name);
    string m_strSID= defaultValue;
    friend ostream& operator<<(ostream&, const Student&);
    friend istream& operator>>(istream&, Student&);
};

#include "Person.h"

ostream & operator<<(ostream &o, const Person &p)
{
    o << p.m_strName;
    return o;
}

istream & operator>>(istream &i, Person &p)
{
    char a[256];
    i >> a;
    p.m_strName = a;
    return i;
}

ostream & operator<<(ostream &o,  const Student &s)
{
    o << s.Person::m_strName<<' '<<s.m_strSID;
    return o;
}

istream & operator>>(istream &i, Student &s)
{
    char a[256]{0};
    i >> a;
    s.Person::m_strName = a;
    return i;
}

Person::Person(const string &s)
{
    m_strName = s;
}

Student::Student(const string & name)
{
    m_strName = name;
}

问题解决的话,请点下采纳

#include<iostream>
#define defaultValue 0
using namespace std;
class Person{
protected:
    string m_strName;
public:
    Person() { cout << "Person constructing" << endl; }
    ~Person() { cout << "Person destructing" << endl; }
    Person(const string&);
    friend ostream& operator<<(ostream&, const Person&);
    friend istream& operator>>(istream&, Person&);
};

class Student:public Person {
private:
    static int m_nLastID;
public:
    int m_strSID;
    Student() {
        cout << "Student constructing" << endl;
        int m_strSID = defaultValue;
        m_strSID = ++m_nLastID; 
    }
    ~Student(){ cout << "Student destructing" << endl; }
    Student(const string&name);
    friend ostream& operator<<(ostream&, const Student&);
    friend istream& operator>>(istream&, Student&);
};

int Student::m_nLastID = 0;

ostream & operator<<(ostream &o, const Person &p)
{
    o << p.m_strName;
    return o;
}

istream & operator>>(istream &i, Person &p)
{
    char a[256];
    i >> a;
    p.m_strName = a;
    return i;
}

ostream & operator<<(ostream &o,  const Student &s)
{
    o << s.Person::m_strName<<' '<<s.m_strSID;
    return o;
}

istream & operator>>(istream &i, Student &s)
{
    char a[256]={0};
    i >> a;
    s.Person::m_strName = a;
    return i;
}

Person::Person(const string &s)
{
    m_strName = s;
}

Student::Student(const string & name)
{
    m_strName = name;
}

int main() 
{
    Student s;
    cout << s;
    return 0;
}