I'm trying to list all the .jpg files using CFileFind class in a console program. I put 3 .jpg files in the same directory for testing.
The program returns 3 32-bit integer, which looks like the addresses of something, but not the names of the jpg files. what's wrong with the code?
BOOL bWorking = finder.FindFile(_T("*.jpg"), 0);
bWorking ==0? printf("not find \n"): printf("found \n");
bWorking = finder.FindNextFile();
cout<<(LPCTSTR)(finder.GetFileName()) << endl;