Answer the question
In order to leave comments, you need to log in
What is the correct way to set the filename for FIndFIrstFile(c++)?
Good afternoon. I can't run the FindFirstFile example.
#include "stdafx.h"
#include <windows.h>
#include <iostream>
using namespace std;
void main()
{
WIN32_FIND_DATA FindFileData;
HANDLE hf;
hf = FindFirstFile("//*.jpg", &FindFileData);
if (hf != INVALID_HANDLE_VALUE)
{
do
{
cout << FindFileData.cFileName << endl;
} while (FindNextFile(hf, &FindFileData) != 0);
FindClose(hf);
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question