title: How to initialize class in another class
body: <p>I am willing to use make class in which constructor should do nothing but in my class i have declare one more class which takes some argument in the constructor. how can I pass arguments in that class?</p>
  
  <p>Right now i am using constructor like below and it is working fine,</p>
  
  <pre><code> /* some other class */
      OtherClass board;
  
  /*main class in which I have declared OtherClass*/
  
      MyClass(std::string calibrationFile, std::string task,
                    std::string device, uInt64 numberOfSamples = 1000, float64 samplingRate = 1.0e4):
              board(task, device, numberOfSamples, samplingRate),
              f(6, 0)
          {}
  </code></pre>
  
  <p>but I want to make it like below,</p>
  
  <pre><code>MyClass():
      board(Task, Device, NumberOfSamples, SamplingRate),
          f(6, 0)
      {
  
      }
  </code></pre>
  
  <p>problem is that I dont know how to initialize arguments that I want to pass in board.
  kindly guide me how can I do that.</p>