karligula said:
.oisyn, yes exactly you include headers that are truely needed, that's what I was trying to say. I'll have to disagree with Reedbeta though and say you should use forward declarations as little as possible ;-) I guess I just prefer having the full definition to hand at all times.
So you're not ageeing with me, as I'm agreeing with Reedbeta. I'm saying: if you can get away with a forward declaration, you should do that

.
The one exception to this rule however might be function return types. You don't need a definition for the return-type in the header, but as soon as you call that function (or method) without actually *using* the return value you'll need anyway it otherwise the compiler doesn't know how to destroy the object. However, you could argue that when using that function you're interested in it's return-type anyway, so you probably already included that particular header in your code.
Quote
And how on earth did you guess we're not using a proper IDE? I'm in awe...
Because any proper IDE would allow you to find a specific definition in your code (in VC++: right-click on the symbol and then "goto definition" in the context menu, or even better when you have Visual Assist installed, open the Find Symbol in Workspace dialog which brings up a list of *all* the project symbols, which gets filtered down as soon as you start to type the symbol which you want to find, and it brings you to the point of definition in code when clicking on a symbol), or at least has some "find in files" feature where you can search all project files for a certain phrase