can classes be put into header files?
Printable View
can classes be put into header files?
Yes. Traditionally, the class declaration is put in a header, and the definition in a source file. Exceptions include templated classes or templated member functions of the class which are usually put in the header as well.
Inline functions usually live in headers, too, as some/many compilers can't inline unless the function is fully visible to that compilation unit.