If I have a program:
#include
using namespace std;
int TestIntReturn(int &x, int &y)
{
x = 1000;
y = 1000;
return x+y;
Everybody answered correctly - the return value in this case is simply discarded, and in this specific example, you can ignore it.
However, if the return value is a pointer to memory allocated inside the function, and you ignore it, you'll have a memory leak.
So some function values you can't just ignore, but in this case - you can.