title: Visual Studio Error: name must be a namespace name
body: <p>This is the 3rd question for today as I am still struggling. The problem is: Visual Studio is giving the error on line 2. It says:</p>
  
  <blockquote>
    <p>Error: name must be a namespace name</p>
  </blockquote>
  
  <p>This is my code, this should open the webcam and it should take frames.</p>
  
  <p>What is wrong here?</p>
  
  <pre class="lang-cpp prettyprint-override"><code>#include "opencv.hpp"
  
  using namespace cv;
  int main(int argc, char** argv)
  {
      VideoCapture cap;
      // open the default camera, use something different from 0 otherwise;
      // Check VideoCapture documentation.
      if (!cap.open(0))
          return 0;
      for (;;)
      {
          Mat frame;
          cap &gt;&gt; frame;
          if (frame.empty()) break; // end of video stream
          imshow("this is you, smile! :)", frame);
          if (waitKey(1) == 27) break; // stop capturing by pressing ESC 
      }
      // the camera will be closed automatically upon exit
      // cap.close();
      return 0;
  }
  </code></pre>