How to pass object to local object method?
<p>I have class B and class A. In method of class B (let name it foo()) I have defined local object of class A. In class A I have method taking B object. How to pass B object to this method of class A when A object is local in method of class B. ?</p>

<pre><code>class B {
public:
  void foo()
  {
     A a;
     a.bar(???); // want to pass B object?
  }
};

class A {
public:
  void bar(B&amp; b)
  {
     ...
  }
};
</code></pre>
