Hello,
Each time I try to run this code, the unix terminal shows me the following error message:
* terminate called after throwing an instance of ‘std::logic_error’
what():basic_string::_ S_construct null not valid
Press <RETURN> to close this window…*
This is my code:
#include<opencv2/opencv.hpp>
#include<opencv2/highgui.hpp>
#include<iostream>
using namespace std;
using namespace cv;
int main(int argc,char **argv){
//Create a window
namedWindow( argv1, WINDOW_AUTOSIZE );
//Load an image
Mat image=imread( argv1 );
//Show the image in the window
imshow( argv1 );
//Clean up
destroyWindow( argv1 );
exit( 0 );
}
Could you tell me how to concretely fix this problem please?
Thank you in advance
Information: Operating system: LinuxMint 17
I am working with OpenQt 3.1.2 (opensource)
↧
How to concretely fix the following error message: what(): basic_string::_S_construct null not valid
↧