I like the naming convention suggestion. Chaining the #includes together is where I thought I'd have to go.
The only other thought I had was to create an enum class for each classlib. I could put it into the base class and all my sub-classes would see it. A little more awkward to reference things as THIS.enum.BADINPUT instead of BADINPUT though. Plus its a pain to see the whole collection of values compared to viewing a .h file.
Thanks,
Bob
>I typically create a .h file for each classlib with the same filename. Whenever a class needs to have an include file they always use the one file. The second classlib .h then has one or more #include OtherClasslib.h files in it. It's kind of a PITA that subclasses don't inherit the include files, but the one .h per .vcx has worked well for me.
>
>>(Using the class builder) I can include a .h file in a class. But if I subclass the class, I have to include the .h file again.
>>
>>Is there a better way to do this? Should I be using some type of enumeration class? What if I want to include 2 (or more) .h files in a class?
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement