Thank you very much, I was able to get to work. Below are two ways of doing it
Method 1.
double my_hurst_exponent = (double)hurstplot(list, dset, opt,prn);
gretl_matrix *hurst_mat;
void *tmp = NULL;
GretlType *hurst_;// = &GRETL_TYPE_MATRIX;
//hurst_mat = reinterpret_cast<gretl_matrix *>(get_last_result_data (hurst_,
&err));
tmp = get_last_result_data (hurst_, &err);
if(!err){
if(*hurst_ == GretlType::GRETL_TYPE_MATRIX){
hurst_mat = reinterpret_cast<gretl_matrix *>(tmp);
std::cout<<hurst_mat->val[0]<<std::endl;
}
}
Method 2.
double my_hurst_exponent = (double)hurstplot(list, dset, opt,prn);
gretl_matrix *hurst_mat;
void *tmp = NULL;
GretlType *hurst_;// = &GRETL_TYPE_MATRIX;
hurst_mat = reinterpret_cast<gretl_matrix *>(get_last_result_data (hurst_,
&err));
riley