C++ convenetions - source and header files for a class -


i'm new cpp, want use object dog, ok use header file class dog? methods implemented in inline manner.
or should partition class header , cpp file implementing methods defined in header file?
class dog used in other cpp file (as concrete object , not pointer - dog dog = new dog()...).

is ok use header file class dog?

yes, ok.

but when programs getting larger, it's more practical separate declaration implementation , organize program semi-independent code fragments, can used minimize compilation times , chance of errors.


Comments

Popular posts from this blog

Ansible - ERROR! the field 'hosts' is required but was not set -

customize file_field button ruby on rails -

SoapUI on windows 10 - high DPI/4K scaling issue -