I use C or java mostly, but not C++. , Recently, I must start to write c++ code and have a question about Class definition.
I have seen Class are defined in either a header (.h) or an implementation (.cpp) file. Is there general rules or guidelines for where to place a C++ Class? Or, pretty much whatever you want.
A class might be placed into an implementation file if it is supposed to be implementation detail, in which case its definition will likely be in an unnamed namespace. Other than that, class definitions are generally placed in header files.