由于某种原因,我的赋值运算符在我尝试使用它时会产生总线错误:
hand1 = hand2;
//overload assignment operator
Hand Hand::operator=(Hand other_hand)
{
if(&other_hand != this){
name = other_hand.name;
cards = other_hand.cards;
}
return *this;
}
错误发生在 return 语句之后