C++中operator =不加取址符会报错

#include <iostream.h>
#include <string>
class mystring{
    char * pstr;
    int length;
public:
    mystring(){
        pstr=NULL;
        length =0;}
    mystring(char * p,int n){
        pstr = new char[n];
        pstr= strcpy(p,pstr);
    }
    ~mystring(){delete[]pstr;}
    mystring  & operator = (const mystring & temp){
        if(pstr!=NULL)
            delete [] pstr;
        length=temp.length;
        pstr=new char[length+1];
        strcpy(pstr,temp.pstr);
        return *this;
    }
    friend ostream & operator<<(ostream & os,mystring & temp);
    friend istream & operator>>(istream & is,mystring & temp);
};

ostream & operator<<(ostream & os,mystring & temp){
    cout<<temp.pstr;
    return os;
}

istream & operator>>(istream & is,mystring & temp){
    char p[10000];
    if((temp.pstr)!=NULL)
        delete []temp.pstr;
    cout<<"请输入字符串内容:"<<endl;
    cin>>p;
    temp.pstr=new char[strlen(p)+1];
    strcpy(temp.pstr,p);
    temp.length=strlen(p);
    return is;
}

void main(){
    mystring a,b;
    cin>>a;
    b=a;
    cout<<"b="<<b<<endl;
}

有引用符,不会报错,输出结果正常

有引用符,不会报错,输出结果正常

没有引用符,报错了

没有引用符,报错了

我想问各位大佬,为什么这里不加引用符会报错

因为你返回的是一个(istream类)同类对象的引用,有使用该类的限制,具体可以百度一下标准流库