What are the pros and cons of using nested public C++ classes and enumerations? For example, suppose you have a class called printer
, and this class also store
If you're never going to be using the dependent class for anything but working with the independent class's implementations, nested classes are fine, in my opinion.
It's when you want to be using the "internal" class as an object in its own right that things can start getting a little manky and you have to start writing extractor/inserter routines. Not a pretty situation.