//异或
Complex Complex::operator^(const Complex c1){Complex temp;temp.rel=this->rel^c1.rel;temp.vir=this->vir^c1.vir;return temp;
}//按位取反
Complex Complex::operator~(){this->rel=~this->rel;this->vir=~this->vir;return* this;
}
//左移
Complex operator<<(Complex c1,int n){c1.rel=c1.rel<<n;c1.vir=c1.vir<<n;return c1;
}
//右移
Complex operator>>(Complex c1,int n){c1.rel=c1.rel>>n;c1.vir=c1.vir>>n;return c1;
}
//+的重载
myString myString::operator+(const myString s1){strcat(this->str,s1.str);this->size=this->size+s1.size;return *this;
}
//==的重载
bool myString::operator==(const myString s1){return !strcmp(this->str,s1.str);
}
//>=的重载
bool myString::operator>=(const myString s1){if(strcmp(this->str,s1.str)==0 || strcmp(this->str,s1.str)){return 1;}elsereturn 0;
}
//&&的重载
bool myString::operator&&(const myString s1){return this->str && s1.str;
}
//!的重载
bool myString::operator!(){return !this->size;
}
//输出运算符重载
ostream &operator<<(ostream &out,myString s1){out << s1.str << '\t' << s1.size ;return out;
}
//输入运算符重载
istream &operator>>(istream &in,myString s1){in >> s1.str >> s1.size;return in;
}