#include #include #include #include #include #include #include using namespace std; int main(void) { vector file_names; string_vector argv(2); argv(0)="embedded"; argv(1)="-q"; octave_main(2,argv.c_str_vec(),1); octave_value_list dir_stuff; dir_stuff(0) = "*.saeC"; octave_value_list dir_return = feval("dir", dir_stuff, 1); //calls dir function returns a octave_map Octave_map my_map = dir_return(0).map_value(); //returns the map_value to a map instance Octave_map::iterator p1 = my_map.seek("name"); //looks for the the key "name" for(int i = 0; i < my_map.contents(p1).numel(); i++) //loop over the times where "name" is found { //my_map.contents(p1) returns a cell array with the value //my_map.contents(p1)(i) returns the ith cell array //my_map.contents(p1)(i).char_matrix_value() returns an octave::charMatrix //my_map.contents(p1)(i).char_matrix_value().row_as_string(0) returns a std::string cout<