When to use multiple CPP files (Good Coding Practice)
|Added at||2016-12-19 02:12|
When writing a C++ program what is considered to be good practice in regards to using multiple cpp files?
IE If you are writing a rather large (lines of code based) object it would generally be easier for comprehension purposes to divide the program in multiple sections.
Lets say you have a thousand lines of just constructors and then a 1000 lines of foo and another of bar. Generally it would be easier for one to read it if they understood they are just viewing all the variations of foo, bar, constructors or any other methods.
What do you consider to be "good practices?" Do you base it on lines of code? Do you do these partitions even in smaller programs (sub 1000 lines total).
I understand this is subjective but what are the rules of the thumbs for dividing your program/object/etc amongst multiple cpp files?