1

Need to add a new derived class which inherit from class "lorum" that is in file "lorum.cpp". Other derived classes are inside the file "lorum.cpp"
Should I put the new derive class in file "lorum.cpp" or make a separate file for the new derived class?

Why do I need to ask this question...

Comments
  • 0
    If the class is defined in "lorum.cpp", you should add the new class to that file as well. Otherwise you would have to include the cpp file into the other file, which is considered bad practice.
  • 1
    @korrat Which is exactly why all but implementation-specific declarations go in headers.
Add Comment