传递文本文件错误 [英] passing text file error
本文介绍了传递文本文件错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在我的knn分类器代码中我有两个文本文件,其中列车和文本数据存储,我将这两个文件传递给knn函数以便读取数据,但是在传递文件后我发现这些文件没有正确传递我的错误是什么代码
这是代码:
in my knn classifier code i have two text file where train and text data store, i pass these two files to knn function in order to read data, but after passing files i find that these files not pass correctly what's wrong with my code
this is the code:
const char *trn_file="Winner.trn";
const char *tst_file="Winner.tst";
knn.LoadData("Winner.trn","Winner.tst");//the call of function
void KNN::LoadData(const char*TrnFile,const char*TstFile)
{
ifstream Trn(TrnFile);
ifstream Tst(TstFile);
.
.
.
}//the function definition
代码中的
自动列车和测试文件看起来像是
in code Autos the train and test files are look like
+ TrnFile 0x00207b50 "‹خئ„$" const char *
火车和测试文件需要价值
the train and test files take the value
"‹خئ„$"
不是赢家
任何猜测
谢谢
not Winner
any guess
thanks
推荐答案
const char *
" const char *
火车和测试文件采取值
the train and test files take the value
"‹خئ„
不是赢家
任何猜测
谢谢
not Winner
any guess
thanks
你需要提供一个完整的路径。其他你最好使用unicode。
you need to provide a full path. Otherwis you better use unicode.
这篇关于传递文本文件错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文