title: Passing a structure/class reference of reference to a function
body: <p>I am newbie in C++ and need some help. 
  I want take a reference passed to a functon  and pass it to another function. This reference is passed to the function encapsulated into another structure/class:</p>
  
  <ol>
  <li><p>I defined a</p>
  
  <pre><code>Class A {
     int ax;
     int ay;
  };
  </code></pre></li>
  <li><p>I defined a: </p>
  
  <pre><code>Class B
  {
     int bx;
     int by;
     A: a;
  };
  </code></pre></li>
  <li><p>I defined a function : <code>f1(B&amp; arg)</code></p></li>
  </ol>
  
  <p>Now, let's say <code>aa</code> is an object of type <code>A</code>:
  I want to pass <code>aa</code> as reference to function <code>f1</code>, but inside the <code>class B</code>.
  Something like this :</p>
  
  <pre><code>B bb;
  bb.b1=10
  bb.b2=20
  bb.a=aa ==&gt; here I want reference to a 
  
  call f1(*bb)
  </code></pre>
  
  <p>But reference is take from another function so the finla stuff is:</p>
  
  <pre><code>caller::f2(&amp;A arg)
  {
    B bb;
      bb.b1=10
      bb.b2=20
      bb.a=arg==&gt; here I want reference to a 
  
      call f1(*bb)
  
  }
  </code></pre>
  
  <p>Thanks.</p>