I searched the forum and couldn't find anything on this, so I guses I'll give this tiny topic its own thread.
What's the point of creating a main() function and calling it at the end of your program? Are there advantages to this method in comparison to just writing the code straight out in no function?