Actually it is not a new function definition, its a function prototype, telling the compiler
that there is somewhere a function called move, not defining it nor calling it.
A function definition looks like:
void foo ()
{
}
A function prototype looks like:
void foo () ;
A function call looks like:
foo () ;
Function calls always have to be inside another function definition, prototypes are normally at
top level but can be locally scoped (ie inside a function definition)
MarkT:
Actually it is not a new function definition, its a function prototype, telling the compiler
that there is somewhere a function called move, not defining it nor calling it.
Thanks Mark.
That explains why the compiler did not complain - I had been wondering about that.
When you write void move();, compiler thinks that you declare sth to move() function. In other words, void is the declaring command of a function as @MarkT's Reply #5 (and Reply #3). To use the function, you just write the function name with brackets in loop. In your code, program takes move() function as blank. That's why compiler sees no problem. It is a logic error.