title: Creating objects as private class variables in C++
body: <p>In my program I'd like to initialise an object from the OpenCV library as part of my own object. However, whenever I initialise it, I receive this error:</p>
  
  <blockquote>
    <p>error: expected parameter declarator</p>
  </blockquote>
  
  <p>It works if I don't initialise the object with it's constructor, but I need to do this. Also, I'd like to be able to use this object's methods later on to modify it with new data. Below is a very simple example of the kind of code which is giving me the error.</p>
  
  <pre><code>class test
  {
      public:
          test (int number);
  
      private:
          cv::LDA lda(2);
  }
  </code></pre>