Information générale
Catégorie:
Codage, syntaxe et commandes
Yes, you need to include the file in each form. I suspect a typo error in your program, since you say you already included the file.
Basically, if you know C/C++, it's easy to know when and where to include a header file, because it's like in C #define in .h file. IE: the defined constant is in fact only a macrosubstitution at compile time.
And avoid having many constants in header files since this is extremly heavy for the compiler and it slows down seriously the compile time.
Vlad
>I have an include file with some constants. In particular, MSG_ERROR is defined in this include file. I have a form class. In the form class I include that include file. I create a form based on the formclass. Some of the code in the form is "WAIT WINDOW MSG_ERROR". When this code is encountered I get, "Variable 'MSG_ERROR' is not found." I figured I forgot to compile everything. So, I did that. Same error. Perhaps the include file needs to be in the form also? I did that and recompiled everything. Same error. This is rather odd and I'm stymied on what to do next.
Précédent
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