title: Passing arguments to the class constructor in a declaration of another class
body: <p>I've got sth like that:</p>
  
  <pre><code>#include &lt;iostream&gt;
  using namespace std;
  
  class FirstClass
  {
      public:
          FirstClass(int _vx) : vx(_vx) {}
          int x () {return vx;}
      private:
          int vx;
  };
  </code></pre>
  
  <p>It's pretty obvious, that I have to write:</p>
  
  <pre><code>int main ()
  {
      FirstClass Object1(666);
      cout &lt;&lt; Object1.x();
      return 0;
  }
  </code></pre>
  
  <p>And everything is ok. But problem is, when I want to have this in another class:</p>
  
  <pre><code>#include &lt;iostream&gt;
  using namespace std;
  
  class FirstClass
  {
      public:
          FirstClass(int _vx) : vx(_vx) {}
          int x () {return vx;}
      private:
          int vx;
  };
  
  class SecondClass
  {
      public:
          FirstClass Member1(666);
  };
  
  int main ()
  {
      SecondClass Object2;
      cout &lt;&lt; Object2.Member1.x();
      return 0;
  }
  </code></pre>
  
  <p>I can't even compile it. So, my question is: how can I pass arguments to constructor of FirstClass in a declaration of SecondClass?</p>
  
  <p>Thanks in advance.</p>