问题描述
有人可以评论我在这里做错了什么吗?我是
重载输入和输出操作符并继续收到此错误。
这里是代码snipets,谢谢
朋友ostream &安培; operator<<(ostream& outs,const big_int&
source){
outs<< source.get_b1()<< " " << source.get_b2();
退货;
}
朋友istream&运算符>>(istream& ins,const big_int&
target){
ins>> target.big_int1>> target.big_int2;
返回ins;
}
can someone please comment on what i may be doing wrong here? i am
overloading input and output operators and keep getting this error.
here are the code snipets, thanks
friend ostream & operator <<(ostream & outs, const big_int &
source){
outs << source.get_b1() << " " << source.get_b2();
return outs;
}
friend istream & operator >>(istream & ins, const big_int &
target){
ins >> target.big_int1 >> target.big_int2;
return ins;
}
推荐答案
这篇关于错误:'&'标记之前的预期初始值设定项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!