Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Howto include a PreProcessor in a .vcx file? 1

Status
Not open for further replies.

RedLion

Programmer
Sep 13, 2000
342
NL
Hello,

If got a file myConstants.h with all kind of #define statements in it, and I would like to use it in a class that I've made and is within a .vcx file. The question is where should I put the statement #include "myConstants.h", should it be in every method of the class where constants are used?

Thanks,

Charl
 
My guess is that you would need to have the #include file in the program that instantiates the class, not in the class itself.
 
If the header file only needs to be accessible to the single class, open the class in the designer (MODI CLASS MyClass OF MyLib.Vcx).

On the menu, Class>Include File.

Save & recompile the class library. Jon Hawkins
 
Thanks Jon,

That was the answer I was looking for.

Thanks,

Charl
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top