Save the id-value pair into file
bool tree_save_values_with_ids( LPCSTR lpcszFilename, const vector<int> vnIDs, const vector<string> & vsValues, const vector<string> & vsLabels, LPCSTR lpcszTreeNodeComment = NULL )
true if succeed
EX1
void tree_save_values_with_ids_ex1() { string strCreateFile = okutil_get_origin_path(USER_FOLDER) +"temp.ini"; if( !strCreateFile.IsFile() ) { out_str("can't open the file!please check it"); return ; } vector<int> vnIDs = {1, 2}; vector<string> vsValues = {"1.1", "2.2"}; vector<string> vsLabels = {"L1", "L2"}; if( tree_save_values_with_ids( strCreateFile, vnIDs, vsValues, vsLabels) ) out_str("read successfully!"); else out_str("save failure"); }
origin.h