Most likely, this will not work in these cases:
funcMulRef(10,3) + funcMulRef(100,500)
alternatively, in a more unpleasant way:
std::cout << "10*3=" << funcMulRef(10,3) << " 100*500=" << funcMulRef(100,500) << std::endl;
gcc will warn of errors of this type if you use -Wall
source
share