there are times when you can use the sane name, but its extremely difficult to follow code written that way, and if careless, you can also get unintentional recursion where it compiles, but goes nuts.
What's this a prototype for the main function?? int main();
You don't need that unless you want to call the main function from another function, and if you do want to call the main function from another function, the world will end (quite literally, so don't do that it will only cause confusion).