what you should do is include the files that you need to in the header file, 
for other types and such, then include them in include the other files for the 
types in the source file that you'll need, after including the header.

                Thanks,
Tyler Littlefield
        http://tds-solutions.net
        Twitter: sorressean

On Jan 24, 2010, at 6:23 PM, Jimmy Johnson wrote:

> I have a file myClass.h which defines an interface. The definition depends on 
> no other classes [headers].
> 
> The implementation of the member functions for myClass in the cpp file uses 
> openGL calls so I must include <gl.h>. (I use a c-wrapper in my main() to get 
> the correct function type for the c++ objects.) 
> Where should I put the #include <gl.h>, in the header file or the cpp file?
> 
> In my [c-like] main [or root] program I include #myClass.h, but I the main 
> also uses glut so I must include <glut.h>, which itself includes <gl.h>. Have 
> I included gl.h twice? Is this bad? If so how do you account for this?
> 
> I am coming from 20 years of programing with Eiffel which does not have these 
> problems.
> 
> thanks again,
> 
> jjj
> 
> 



------------------------------------

To unsubscribe, send a blank message to 
<mailto:[email protected]>.Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/c-prog/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/c-prog/join
    (Yahoo! ID required)

<*> To change settings via email:
    [email protected] 
    [email protected]

<*> To unsubscribe from this group, send an email to:
    [email protected]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/

Reply via email to