View Full Version : AVOIDING mutiple inclusion of header file???
pratik
9th July 2007, 12:23
HI
HOW CAN WE AVOID MULTIPLE INCLIUSION OF HEADER FILE IN QT??
OTHER THAN WRAPPING .H FILE IN #endif,#include etc
can we give something like:-
<class_ name> *<class_object> in a header file
eg if v have a class EUREKA, can v do:-
EUREKA *e[3];
to make 3 pointer of type class EUREKA in a .h file
if not how can v declare such pointers if v have to use them across other classes
THANK U
I don't mean to be rude, but what does this have to do with Qt? It's basic C/C++. And please don't shout.
jacek
9th July 2007, 12:37
You can use forward declarations to avoid including header files in other header files, but they will allow you only to declare pointers and references.
pratik
10th July 2007, 08:08
sorry to bother all of u again but i already know how to implement the following in c/c++,
turbo c++,borland c++, c#, VC++(MFC), java(core), the thing is the problem is peculiar
with QT.......... and its giving the error........i didn't mean to shout but i was
desperate......
HI
HOW CAN WE AVOID MULTIPLE INCLIUSION OF HEADER FILE IN QT??
OTHER THAN WRAPPING .H FILE IN #endif,#include etc
can we give something like:-
<class_ name> *<class_object> in a header file
eg if v have a class EUREKA, can v do:-
EUREKA *e[3];
to make 3 pointer of type class EUREKA in a .h file
if not how can v declare such pointers if v have to use them across other classes
THANK U
jacek
10th July 2007, 14:09
Please, don't shout and don't start multiple threads on the same topic.
Read about forward declarations.
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.