>>278 クラスの外に書くとはこういうことだよ

#include <iostream>
using namespace std;

class hoge{
  private:
  int h_size;
  class foo *h_foo;
  public:
  hoge(){ h_size=0; }
  void setFoo(class foo *f){ h_foo=f; }
  int get_h_size(){ return h_size; }
  void h_print(); //{ cout<<h_foo->get_f_size()<<endl; }
};
class foo{
  private:
  int f_size;
  class hoge *f_hoge;
  public:
  foo(){ f_size=1; }
  void setHoge(class hoge *h){ f_hoge=h; }
  int get_f_size(){ return f_size; }
  void f_print(); //{ cout<<f_hoge->get_h_size()<<endl; }
};
inline void hoge::h_print(){ cout<<h_foo->get_f_size()<<endl; }
inline void foo::f_print(){ cout<<f_hoge->get_h_size()<<endl; }