相关疑难解决方法(0)

在Windows上用C +/C中的Globbing

Windows中的C或C++中是否有流畅的方式?

例如,myprogram.exe*.txt向我的程序发送一个ARGV列表,其中包含... ARGV [1] = *.txt.

我希望能够有一个函数(让我们称之为readglob),它接受一个字符串并返回一个字符串向量,每个字符串包含一个文件名.

这样,如果a.txt b.txt c.txt我的目录中有文件而readglob得到一个参数*.txt,它将返回上面的文件列表.

//Prototype of this hypothetical function.
vector<string> readglob(string);
Run Code Online (Sandbox Code Playgroud)

这样的存在吗?

c c++ windows glob

20
推荐指数
1
解决办法
1万
查看次数

标签 统计

c ×1

c++ ×1

glob ×1

windows ×1