首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > C++ >

指纹验证成功后吧成功名字保存到记事本,这样可以吗?该如何解决

2012-06-10 
指纹验证成功后吧成功名字保存到记事本,这样可以吗?if (fi -1)MessageBox(Identify Failed)else{spr

指纹验证成功后吧成功名字保存到记事本,这样可以吗?
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是什么?为什么底下又重新定义了??

热点排行