What is the normal practice when it comes to non-member function in C++? Do we put them in main.cpp or header file or class implementation file, or do we make a separate .cpp fi
Your class should have its own .cpp file. Non-member functions should go in other files (all together or grouped according to similarity). That's the convention here in North America, but conventions differ. Prototype just needs go into header file so you can include it wherever you use it.