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
Post a Comment