   where to #include ?
  where is the right place to put the #includes ? please answer with explanation why you think its good.i have seen #includes in .cpp files , in .h files , in both , sometimes i see the in the .h file people just forward declare a class they use and not include it , and put the include in the cpp, and if you put include in cpp , what about the guards (#ifdef #define #endif)  Gony 
  You can put it in .c, .cpp, .h where you want . So there is no answer for that question because there are situations where better put #include in .h, some times better put it to .c or .cppPrograming is like cooking, You can cook chicken by many ways, but you decide how you do it. It is mater of taste.;  A good approach is to #include headers that are required by the declarations in the .h file in that .h file, and any others in .c/.cpp files. This way the .c/.cpp files do not get any #includes they do not need, and thus you prevent too much interdependance in your project. As an added step you can use forward declaration for classes in headers if the stuff in the header is only using pointers to this class - saves another #include and thus another needless dependency.Marijn ; /Please excuse my bad spelling - My native language is binary not english|Visit me\Take my advice - I don''''t use it... 