Hi all, I'm new here and needed some assistance regarding this program I'm writing.
I'm trying to make the 2048 in c++ and I'm using switch statements to control movement.
However, I'm not sure how to add a function's prototype return value to an integer variable.
For example, if I have a function prototype declared as int shiftDown();
and I have to later add that function prototype to a variable called move, how would I do that?
This is what I have now, but it does not work.
case 'w':
{
moved = shiftUp();
moved += sumUp();
moved += shiftUp();
}
That was basically my wild guess at it. I've looked around and can't seem to find anything specifically regarding this.