 <p>On Windows you can use the <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/aa364418(v=vs.85).aspx" rel="nofollow">FindFirstFile</a> / <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/aa364428(v=vs.85).aspx" rel="nofollow">FindNextFile</a> APIs to search for files in a path. There is no standard way to enumerate files in Visual C++ (or in C++ in general for that matter). But since your'e using Visual C++, there's a good chance you're programming for Windows so it makes sense to look at the Windows Platform API for a solution to your problem.</p> <pre><code> WIN32_FIND_DATA findFileData; HANDLE hFind; // find all files that start with a_ in a specific directory hFind = FindFirstFile("C:\\PATH\\TO\\DIRECTORY\\a_*", &amp;findFileData); if (hFind != INVALID_HANDLE_VALUE) { while(hFind != INVALID_HANDLE_VALUE) { if (findFileData.dwFileAttributes &amp; FILE_ATTRIBUTE_DIRECTORY) { /* current entry is a directory */ } else { /* file name is findFileData.cFileName */ } hFind = FindNextFile(hFind, &amp;findFileData); } FindClose(hFind); } </code></pre> <p>The example above is a simple way of enumerating through all files (and subdirectories) in a given path, that start with <code>a_</code>. If you need to look in sub-directories as well, then you should extend the method to recursively process each subdirectory, and change it so it will examine all files, and test for file name match on each file.</p>