○ファイルとフォルダの列挙
Windowsで動作します
ワイルドカードで指定できます
#include <stdio.h>
#include <io.h>
int main(void)
{
struct _finddata_t fd;
long fhd;
fhd = _findfirst("*.cpp", &fd);
if (fhd == -1) return 1;
do {
printf("%s\n",fd.name);
} while (!_findnext(fhd, &fd));
_findclose(fhd);
return 0;
}