Globbing in C++/C, on Windows

前端 未结 5 1845
礼貌的吻别
礼貌的吻别 2020-12-01 14:41

Is there a smooth way to glob in C or C++ in Windows?

E.g., myprogram.exe *.txt sends my program an ARGV list that has...ARGV[1]=*.txt in it.

5条回答
  •  星月不相逢
    2020-12-01 14:44

    Ehw. I had to implement something like this in ANSI C about 15 years ago. Start with the ANSI opendir/readdir routines, I guess. Globs aren't exactly RegExs, so you will have to implement your own filtering.

提交回复
热议问题