Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Error C2015

Hi I have a question again: I'm writing program for capturing video from my camera in Opencv and this is the program:

include "opencv2/opencv.hpp"

using namespace cv; int main(int, char**) { VideoCapture cap(0);

if (!cap.isOpened())
    return -1;
while (1)
{
    Mat frame;
    cap.read(frame);
    imshow('video', frame);

    if (waitKey(30) == 's')
    {
        break;
    }
}
return 0;

} But when i compile this program i've got the error on "imshow('video', frame); It's Error C2015:too many characters in constant How can i fix this? Thank you so much

click to hide/show revision 2
None

updated 2019-10-09 03:20:24 -0600

berak gravatar image

Error C2015

Hi I have a question again: I'm writing program for capturing video from my camera in Opencv and this is the program:

include "opencv2/opencv.hpp"

#include "opencv2/opencv.hpp"
using namespace cv;
 int main(int, char**)
{
    VideoCapture cap(0);

cap(0);

    if (!cap.isOpened())
     return -1;
 while (1)
 {
     Mat frame;
     cap.read(frame);
     imshow('video', frame);

     if (waitKey(30) == 's')
     {
         break;
     }
 }
 return 0;
}

} But when i compile this program i've got the error on "imshow('video', frame); It's Error C2015:too many characters in constant How can i fix this? Thank you so much