View Single Post
damnshock's Avatar
Posts: 179 | Thanked: 86 times | Joined on Dec 2009 @ Barcelona
#17
Originally Posted by saxen View Post
while i'm bothering you with this silly questions, i've another doubt about inclusions

how to use #include? i mean it's different from java import, so using include(from what i remember) means include "piece of code"(correct if i'm wrong) and not just import a name space!

so, how to avoid duplicate include?
suppose i have main class, firstclass and secondclass, if i include secondclass in firstclass, and first class in main, does main class automatically include secondclass?

i hope u can understand what i'm trying to say
#include is macro directive, an it does what it says: *includes*. You'll make your program bigger in size


#ifndef H_WHATEVER
#define H_WHATEVER


//CODE

#endif

Does this solve your problem?

PS:I'm too learning C++ to develop with Qt
 

The Following User Says Thank You to damnshock For This Useful Post: