Thanks - the exercise I was working with had a dozen or so classes that needed visibilty of each other. I was trying to understand when to use a #include statement and when to use an incomplete class definition. e.g. in the .h file for class A, the return type of one of the functions was of type class B. I have to make class A aware of class B. An incomplete class definition was used rather than a #include statement. But why shouldn't you use an include statement? In the .cpp file for class A, the #include statement was used ?
Gill BC
|