Question about exceptions and classes

Okay my question needs to start with classes I think. It may sound like a simple question, but it is one I have never heard the answer to and is not in my books or in the tutorials on here. Can I have 2 classes on one header file? The reason I am wondering is because if I go to make a header file for exception handling can I have multiple exception class in one header file so that I do not have 10 header files.
Can I have 2 classes on one header file?


Yes. Whether or not that's always a good idea is another story -- it really depends on the circumstances.
Would it be okay to use for exception handling? To have like a class exception_one and class exception_two in the same header
Last edited on
That sounds ok to me. In fact, because the exception classes tend to be thin, I tend to put all my
exception classes in one header.
Topic archived. No new replies allowed.