title: Where do you typically declare and define functions outside a class in c++?
body: <p>I've been studying C++ for a little while now and want to start getting into actual application/software development. The problem is I'm having a hard time figuring out some of the more practical aspects of how to exactly setup a project. My question today is if I have a function that is not being declared and defined in a standard class structure, where exactly should I, or is it most common to, declare and define it? Most tutorials you watch will declare a function in main.cpp, above main() and then define it below main() but I assume that is just for teaching purposes and not real world application. Should you just create function header and source files just as you would with classes? </p>