C++ forward reference

I have two C++ classes, Foo and Bar. Foo is defined in Foo.h and Foo.cc, and Bar is defined in Bar.h and Bar.cc.

Foo is a container for many instances of Bar. Instance methods of Foo return references to instances of Bar. Foo also does some low-level manipulation of Bar's member variables.

However, I have a reference to the container object Foo in every instance of Bar. So, I'm using a forward declaration in Bar.h that looks like this, at the top of that file:

class Foo;

Very simple stuff. This works fine.

Now, I would actually like to do more than just have a reference to Foo inside of Bar. I would like to have access to Foo's innards as well. However, when I try to access any of Foo's innards from Bar, I get a compilation error message that looks like this: