|
3驿站币
本帖最后由 CDocking 于 2016-3-26 12:40 编辑
先贴出源码
file.Open(strPath, CFile::modeRead |CFile::shareDenyNone);
file2.Open(strPath, CFile::modeRead |CFile::shareDenyNone);
fileOK.Open(strPath+_T("_OK.txt"), CFile::modeCreate | CFile::modeReadWrite);
file2.ReadString(strTextFind);
while (file.ReadString(strText))
{
MessageBox(strText);
while (file2.ReadString(strTextFind))
{
if (strTextFind == strText)
{
break;
}
}
fileOK.SeekToEnd();
fileOK.WriteString(strText + _T("\r\n"));
}
思路是第一while进行循环读取,每一次读取都会到第二个while里面进行配对。如果相同则跳出第二个while,进行文件写入。再次进入while进行循环。
但是却没法实现功能。求指导 |
最佳答案
查看完整内容
我之前写过类似的小工具,https://www.cctry.com/thread-252131-1-1.html 希望对楼主有帮助!
上一篇: 关于局域网聊天室 如果实现公网通信下一篇: VC++怎么返回POST登录后网页源码?
|