On the technical side, when you need to obey one definition rule , you need to separate declarations from definitions, since you will need to include ads many times in several translation units, but you only need one definition.
In aesthetic terms, the answer can be something like “always” or “systematically”. In any case, you should always have a title for each logical unit of code (for example, one class or one set of functions); and the source file is optional, depending on whether you have everything specific built-in (excluding you from ODR) or if you have a template library.
-, , , . , , , .