3 ms·
The type of that value is the type returned by that function. If you want to see what that type is, look at the function. That's not as weird as it sounds. Cons
by gohrt 13y ago
The type of that value is the type returned by that function. If you want to see what that type is, look at the function. That's not as weird as it sounds. Consider:
int x = foo(2);
What is x? OK, you know it is an "int", due to the redsundant declaration. But that's not useful to you the programmer.
int foo(int n) { return n+1 }
Ok, foo is successor. But you have to look at the definition to remind yourself that. Why not put that in the declaration of x as well?