title: OpenCv - cv::Exception at memory location C++
body: <p>I am trying to code an openCV program that opens a new widow that displays video from the webcam (laptop), and recieve  the error <code>Unhandled exception at 0x7530C41F in cv.exe: Microsoft C++ exception: cv::Exception at memory location 0x001FF5D0.</code></p>
  
  <p>i have double checked all of the included dll's as well as the system path without any positive results.</p>
  
  <p>here is my code:</p>
  
  <pre><code>#include &lt;opencv\cv.h&gt;
  #include &lt;opencv\highgui.h&gt;
  using namespace cv;
  int main()
  {
  
      Mat image;
  
      VideoCapture cap;
      cap.open(0);
  
      namedWindow("window", CV_WINDOW_AUTOSIZE);
  
      while (1)
      {
          cap &gt;&gt; image;
          imshow("window", image);
          waitKey(33);
      }
      return 0;
  }
  </code></pre>