[問題] fopen()/strcpy()疑問?

看板C_and_CPP (C/C++)作者 (alex)時間15年前 (2011/06/05 04:12), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/1
使用VC6, 用途比較folder A and B內的file是否一樣 但一直傳回"unhandled exception in main.exe 0x0000005: Access Vioation" 請各位大大幫忙解答 感謝! char *source_path = "c:\\code\\Comp\\A\\*.*"; char *source = "c:\\code\\A\\"; char temp_B[255]={0}; char *destination = "c:\\code\\B\\"; WIN32_FIND_DATA FindFileData_A; HANDLE hFindFile_A; hFindFile_A = FindFirstFile(source_path, &FindFileData_A); do{ FILE *fptr; strcpy(temp_B,destination); strcat(temp_B,FindFileData_A.cFileName); fptr = fopen(temp_B,"r"); if(fptr != NULL) //found else //no found }while(FindNextFile(hFindFile_A, &FindFileData_A)); -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 220.132.14.152
文章代碼(AID): #1Dwf6IVt (C_and_CPP)
文章代碼(AID): #1Dwf6IVt (C_and_CPP)