How to concretely fix the following error message: what(): basic_string::_S_construct null not valid
-
wrote on 4 Jul 2014, 15:45 last edited by
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( argv[1], WINDOW_AUTOSIZE ); //Load an image Mat image=imread( argv[1] ); //Show the image in the window imshow( argv[1] ); //Clean up destroyWindow( argv[1] ); exit( 0 );
}
Could you tell me how to concretely fix this problem please?
Thank you in advanceInformation: Operating system: LinuxMint 17
I am working with OpenQt 3.1.2 (opensource) -
Hi and welcome to devnet,
Unless I'm missing something, this is not related to Qt. You should ask this question on the OpenCV forums
1/2