рекурсивные классы друзей

Есть ли способ обойти это:

class B;

class C { 
 public:
  C() { }
 private:
  int i;
  friend B::B();
};

class B { 
 public:
  B() { }
 private:
  int i;
  friend C::C();
};

Выдает ошибку:

prog.cpp:8: error: invalid use of incomplete type ‘struct B’
prog.cpp:1: error: forward declaration of ‘struct B’
8
задан Parth Jani 15 July 2013 в 09:35
поделиться