writing functions and classes

I was just wondering,do people usually write their function definitions, prototypes and classes in a separate file or all in main? Which one is the better practice?
Best practice is to write your class declaration in a .h file and your class implementation in a .cpp file.
Alright. Ill stop writing my decelerations and definitions in main then and start practicing writing it separately
Topic archived. No new replies allowed.