Name: Anonymous 2009-02-14 8:55
I'm new to c and I'm trying a tutorial. All of the code is identical but it doesn't do what it's meant to. It's meant to find all files the address and spit out their names. All it does at the moment is spit out a sequence of 8 Hex digits(from 0 to F).
#include <windows.h>
#include <iostream>
using namespace std;
int main(){
HANDLE hFind;
WIN32_FIND_DATA FindData;
hFind = FindFirstFile(TEXT("C:\\Users\\perru\\Downloads\\*.exe"), &FindData);
cout << FindData.cFileName << endl;
while (FindNextFile(hFind, &FindData)){
cout << FindData.cFileName << endl;
}
FindClose(hFind);
return 0;
}
#include <windows.h>
#include <iostream>
using namespace std;
int main(){
HANDLE hFind;
WIN32_FIND_DATA FindData;
hFind = FindFirstFile(TEXT("C:\\Users\\perru\\Downloads\\*.exe"), &FindData);
cout << FindData.cFileName << endl;
while (FindNextFile(hFind, &FindData)){
cout << FindData.cFileName << endl;
}
FindClose(hFind);
return 0;
}