htuple转换string

Halcon中HTuple数据类型怎样转换为C#中的字符串、int、double这些类型的数据

 
  //string 转 htuple    
    //先把string转换为char*
    string path = "d:/Image/side/";
    const char* pImageName = path.c_str();
    
    HTuple hv_path;
    hv_path = (HTuple)(pImageName);
    
    //htuple转string
    path = hv_path.S();
 
    path += "template.png";
    hv_path = (HTuple)(path.c_str());
    string s = hv_path.S();
    cout << s << endl;