Closed
Description
Here is a sample test to show the problem:
int fib(int n)
{
if(n < 2) return 1;
return fib(n-2)+fib(n-1);
}
int addOneFirst(int &n)
{
return ++(n);
}
int addOneAfter(int &n)
{
return (n)++;
}
int minusOneFirst(int &n)
{
return --(n);
}
int minusOneAfter(int &n)
{
return (n)--;
}
Output:
test.cpp:14:14: expected an expression
return (n)++;
^
test.cpp:24:14: expected an expression
return (n)--;
^
Metadata
Metadata
Assignees
Labels
No labels