/in/foo.cc: In member function 'BigInt& BigInt::operator*(BigInt&)':
/in/foo.cc:71:31: error: invalid initialization of non-const reference of type 'BigInt&' from an rvalue of type 'BigInt'
res = *this * obj.value[i] << i;
~~~~~~~~~~~~~~~~~~~~~^~~~
/in/foo.cc:45:7: note: initializing argument 1 of 'bool BigInt::operator=(BigInt&)'
bool operator=(BigInt &bi)
^~~~~~~~
/in/foo.cc:72:14: error: invalid initialization of non-const reference of type 'BigInt&' from an rvalue of type 'BigInt'
sum = sum + res;
~~~~^~~~~
/in/foo.cc:45:7: note: initializing argument 1 of 'bool BigInt::operator=(BigInt&)'
bool operator=(BigInt &bi)
^~~~~~~~
/in/foo.cc:67:18: warning: reference to local variable 'sum' returned [-Wreturn-local-addr]
BigInt res(0), sum(0);
^~~