|
|
In function 'int main()': 14:5: error: void value not ignored as it ought to be At global scope: 19:26: error: ISO C++ forbids declaration of 'max' with no type [-fpermissive] In function 'int max(int&, int&, int&)': 33:1: warning: no return statement in function returning non-void [-Wreturn-type] |
and returns the maximum value |
void
-- no value.void
into int q;
int
. Alas, the function does not return any value.
|
|
q = max( x, y, 0 );
?