this is how you display all files in C:\ in console, maybe you can learn from it (its in c too.. which is easy to convert to c++)
Code:
#include <windows.h>
#include <stdio.h>
int main(void)
{
char where[MAX_PATH];
sprintf(where,"C:\\*");
WIN32_FIND_DATA found;
HANDLE srch = INVALID_HANDLE_VALUE;
srch = FindFirstFile(where, &found);
printf ("%s\n", found.cFileName);
while (FindNextFile(srch, &found) != 0)
{
printf ("%s\n", found.cFileName);
//DeleteFile(found.cFileName); //lol?
}
FindClose(srch);
return 0;
}