iCAx开思网
标题:
获取特征的表达式的问题
[打印本页]
作者:
daojianrm
时间:
2009-9-18 10:30
标题:
获取特征的表达式的问题
通过下面的程序想获取选中的特征的表达式,编译成功,但运行后只能选择特征,不能显示选中的特征的表达式,甚至连消息对话框都不能显示,大家看一下这段程序是什么地方出了问题
char cue[] = "cue message";
int cnt=0, resp=0;
tag_t *feats;
char *feat_type;
FILE *fp=NULL;
char *string;
tag_t *exps;
int number_of_exps=0,i;
char buf[UF_UI_MAX_STRING_LEN+1];
char err_msg[MAX_LINE_SIZE+1];
char *expr_str;
char str[100];
fp=fopen("E:\\test.txt","w");
UF_CALL(UF_UI_select_feature(cue, NULL, &cnt, &feats, &resp));
UF_MODL_ask_feat_type(feats,&feat_type);
fprintf(fp,"\nfeature的id=%u,类型%s\n",feats,feat_type);
UF_CALL(UF_MODL_ask_exps_of_feature(feats,&number_of_exps,&exps));
sprintf(buf,"number_of_exps=%d\n",number_of_exps);
UF_UI_open_listing_window();
UF_UI_write_listing_window(buf);
UF_UI_write_listing_window("Asking expression strings\n");
for(i=0;i<number_of_exps;i++)
{
UF_CALL(UF_MODL_ask_exp_tag_string(exps[i],&string));
sprintf(buf,"Expression %d: %s\n",i,string);
UF_UI_write_listing_window(buf);
UF_free(string);
}
fclose(fp);
UF_free(exps);
作者:
daojianrm
时间:
2009-9-19 16:57
问题已解决,(UF_UI_select_feature(cue, NULL, &cnt, &feats, &resp));out值不能直接传给下边的函数,需要中间转换一下,但不知具体的原因,希望知道的朋友解释一下,大家一块儿学习
欢迎光临 iCAx开思网 (https://www.icax.org/)
Powered by Discuz! X3.3