After creating and definition class (in “h file”).
How do I decide to create (or not) “cpp file” (only for the class) in addition to “h file” (that belonging to the class)?
After creating and definition class (in h file). How do I decide to create
Share
The best practice is to separate the header and implementation files so you define the class inside the header file .h and implement it inside the .cpp file, this will help you to trace and debugging the errors and shows a clean code ,
Just note in the templates classes it have to be defined in a separate header file to keep your code structured well and clean by separating templates from normal classes