读书人

指纹验证成功后吧成功名字保存到记事本

发布时间: 2012-06-10 14:03:15 作者: rapoo

指纹验证成功后吧成功名字保存到记事本,这样可以吗?
if (fi == -1)
MessageBox("Identify Failed");
else{
sprintf(buffer, "Identify Failed Name = %s Score = %d Processed Number = %d", FFingerNames[fi], Score, ProcessNum);
{
ofstream outfile("userinfo.txt",ios::app);
if(! outfile)
{cerr<<"open userinfo.txt error!"<<endl;
exit(1);
}

char FFingerNames[100];
outfile.put(FFingerNames[fi]);


outfile.close();
}
MessageBox(buffer);



2012-05-15 09:11回复举报 |


[解决办法]
你的代码为什么会这样
sprintf(buffer, "Identify Failed Name = %s Score = %d Processed Number = %d", FFingerNames[fi], Score, ProcessNum);
{
ofstream outfile("userinfo.txt",ios::app);
if(! outfile)
{cerr<<"open userinfo.txt error!"<<endl;
exit(1);
}

char FFingerNames[100];

我想问的是你在sprintf里面用到的FFingerNames是什么?为什么底下又重新定义了??

读书人网 >C++

热点推荐