visual studio - OpenCV 3.2 CommandLineParser on Windows 7 -


i creating software on opencv3.2 on windows7 (msvs-2017). using cv::commandlineparser getting commandline arguments. problem facing is, call constructor of commandlineparser, bad_alloc runtime problem. code this.

#include "stdafx.h" #include <opencv2/core.hpp> #include <iostream>  using namespace std; using namespace cv; void passargument(int argc, char **argv) {     cout << "hello";     cv::commandlineparser parser{ argc, argv, "{ h    |       | print }" "{ info    | false | print info }" "{ t true    | true  | true value }" "{ n unused  |       | dummy }" };           cout << "after constructor";      if (parser.get<bool>("help")) {         cout << "help" << endl;      }      if (parser.get<bool>("info")) {         cout << "info" << endl;     } }    int main(int argc, char** argv) {     // initialize command-line parser     passargument(argc, argv);      return 0; }  

the output of "hello after constructor" when debug program, throws exception @ constructor bad alloc.

i have tried allocate memory 3rd parameter same result. same program works fine on linux opencv 3.2. has tried on windows environment , faced similar problems? please help.

thanks, soumya


Comments

Popular posts from this blog

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

python Tkinter Capturing keyboard events save as one single string -

sql server - Why does Linq-to-SQL add unnecessary COUNT()? -