I am using MS Visual Studio 2012 and OpenCV 3.1. I want to compile this code:

```
#include <opencv2/opencv.hpp>

using namespace cv;

int main(){

    //Generate matrix to store image
    Mat image;

    //initialize capture
    VideoCapture cap;
    cap.open(0);

    //Create window to show image
    namedWindow("window", 1);

    while (1){
        //copy webcam stream to image
        cap >> image;

        //print image to screen
        imshow("window", image);

        //delay 33ms
        waitKey(33);

    }

}

```

However, I am getting these errors:

```none
Error   1   error C2065: 'videoCapture' : undeclared identifier C:\Users\patha\documents\visual studio 2012\Projects\video\video\video.cpp  8   1   video
Error   2   error C2146: syntax error : missing ';' before identifier 'cap' C:\Users\patha\documents\visual studio 2012\Projects\video\video\video.cpp  8   1   video
Error   3   error C2065: 'cap' : undeclared identifier  C:\Users\patha\documents\visual studio 2012\Projects\video\video\video.cpp  8   1   video
Error   4   error C2065: 'cap' : undeclared identifier  C:\Users\patha\documents\visual studio 2012\Projects\video\video\video.cpp  9   1   video
Error   5   error C2228: left of '.open' must have class/struct/union   C:\Users\patha\documents\visual studio 2012\Projects\video\video\video.cpp  9   1   video
Error   6   error C2065: 'cap' : undeclared identifier  C:\Users\patha\documents\visual studio 2012\Projects\video\video\video.cpp  14  1   video
Error   7   error C3861: 'waitkey': identifier not found    C:\Users\patha\documents\visual studio 2012\Projects\video\video\video.cpp  18  1   video
    8   IntelliSense: identifier "videoCapture" is undefined    c:\Users\patha\Documents\Visual Studio 2012\Projects\video\video\video.cpp  8   6   video
    9   IntelliSense: identifier "waitkey" is undefined c:\Users\patha\Documents\Visual Studio 2012\Projects\video\video\video.cpp  18  6   video

```