食字的部首是什么:急!编程高手请进!

来源:百度文库 编辑:高校问答 时间:2024/04/27 14:02:22
用C编个程序,找出两个文件夹中相同文件名的文件,并输出这两个文件的绝对地址。
很急!求编程高手点解点解,谢谢!!!
这都什么跟什么呀!老子就是不知道了才在这儿问的!
还有啊,应该是指针吧~瞎说的人靠边站!
知道的能不能说得详细点啊~~~源代码写出来,谢谢了!!!

用VC++可不可以

主要代码段:
UpdateData(1);
m_ctlList1.ResetContent();
if(m_sPath1.GetLength()<2 || m_sPath2.GetLength()<2 ) return;

CFileFind f;
CString strFoldername = m_sPath1+"*.*";
BOOL IsFinded=(BOOL)f.FindFile(strFoldername);
CString strTmp;

while(IsFinded){
IsFinded=(BOOL)f.FindNextFile();
if(!f.IsDots() && !f.IsDirectory()){//只找文件
strTmp=f.GetFileName();
strTmp.MakeUpper();
m_arOne.Add(strTmp); //添加文件到数组.
strTmp=f.GetFilePath();
m_arTwo.Add(strTmp); //添加路径到数组
}
}

//查找第二个文件夹下的文件.
strFoldername = m_sPath2+"*.*";
IsFinded=(BOOL)f.FindFile(strFoldername);
while(IsFinded){
IsFinded=(BOOL)f.FindNextFile();
if(!f.IsDots() && !f.IsDirectory()){//只找文件
strTmp=f.GetFileName();
strTmp.MakeUpper();
if(IsEqaul(strTmp)){//比较
strTmp = f.GetFilePath();
m_ctlList1.AddString(strTmp);
}
}
}
f.Close();

什么啊~~
楼上的~
是指针~~

文件搜索命令函数,再用输出命令,再用寻址,再输出地址。
具体的就不赘述了。

用指钟呀

指针

shizhong