title: OpenCV in C++: "Unknown Type Name"
body: <p>I'm trying to follow along with the OpenCV tutorial, found <a href="http://docs.opencv.org/doc/user_guide/ug_features2d.html?highlight=surf" rel="nofollow">here</a>. Part of the tutorial is to create a SURF feature detector. </p>
  
  <p>Unlike the tutorial, my code is in a header file, like this:</p>
  
  <pre><code>class Img {
      Mat mat;
      int minHessian = 400;
      SurfFeatureDetector detector(minHessian);
  
      public:
          ...
  }
  </code></pre>
  
  <p>The error I'm getting occurs on the line</p>
  
  <pre><code>SurfFeatureDetector detector(minHessian);
  </code></pre>
  
  <p>and the error is:</p>
  
  <pre><code>Unknown type name 'minHessian'
  </code></pre>
  
  <p>When I do not put this in a separate class, the compiler does not complain. I have also checked and I have imported the required libraries.</p>
  
  <p>Can anybody tell me what the error is, and how to fix it?</p>