用C++实现遍历指定目录下的[指定文件后缀名]文件
#include
<
stdio.h
>
#include
<
direct.h
>
#include
<
string
>

#include
<
windows.h
>

using
namespace
std;
void
search_directory(
const
string
&
caseFileName)
...
{

if (GetFileAttributes(caseFileName.c_str()) & FILE_ATTRIBUTE_DIRECTORY) ...{
C++遍历指定目录下特定后缀文件

本文介绍如何使用C++编程语言,结合string、search、path和file system库,遍历给定目录中所有具有特定文件扩展名的文件。
最低0.47元/天 解锁文章
1676

被折叠的 条评论
为什么被折叠?



