You need either the prototype or the definition before you try and use the function.

Which way you go in a program that fits in a single source file is just a matter of style.

But function...