c++ - Unhandled exception at 0x6FEB1F62 (libstdc++-6.dll) in Octave Stand-alone program -


i've created octave stand-alone program crashes after running following error:

unhandled exception @ 0x6feb1f62 (libstdc++-6.dll) in pdetection.exe: 0xc0000005: access violation reading location 0x00000007.

here code:

#include "stdafx.h" #include <iostream> #include <fstream> #include <sstream> #include <octave/oct.h> #include <octave/octave.h> #include <octave/parse.h> #include <octave/builtin-defun-decls.h>  int main(void) {     string_vector argv(2);     argv(0) = "pdetection";     argv(1) = "-q";      // 1. initialize octave interpreter     octave_main(2, argv.c_str_vec(), 1);      // 2. read frame data csv matrix     matrix a_matrix = matrix(118, 48);     std::ifstream file("framedata2.csv");      (int row = 0; row < 118; ++row)     {         std::string line;         std::getline(file, line);         if (!file.good())             break;          std::stringstream iss(line);          (int col = 0; col < 48; ++col)         {             std::string val;             std::getline(iss, val, ',');             if (!iss.good())                 break;              std::stringstream convertor(val);             convertor >> a_matrix(row, col);         }     }      //// print matrix     //std::cout << "frame data:" << std::endl     //<< a_matrix << std::endl;      // 3. pass frame data octave algorithm     octave_value_list in;     in(0) = a_matrix;      octave_value_list out = feval("pdetection", in, 1);     double posture = out(0).double_value();      // 4. print out prediction     if (!error_state && out.length() > 0)     {          std::cout << "prediction:" << std::endl             << posture << std::endl;     }     else     {         std::cout << "invalid\n";     }      return 0; } 

i'm brand new c++, can point me resource/help me figure out bug? thanks,

melissa


Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -

How to provide Authorization & Authentication using Asp.net, C#? -