Expanding Wildcard Arguments
When you run a C program, you can use either of the two wildcards — the question mark (?) and the asterisk (*) — to specify filename and path arguments on the command line.
By default, wildcards are not expanded in command-line arguments. You can replace the normal argument vector
argv loading routine with a version that does expand wildcards by linking with the setargv.obj or wsetargv.obj file. If your program uses a
main function, link with setargv.obj. If your program uses a
wmain function, link with wsetargv.obj. Both of these have equivalent behavior.
To link with setargv.obj or wsetargv.obj, use the /link option. For example:
cl example.c /link setargv.obj
The wildcards are expanded in the same manner as operating system commands. (See your operating system user's guide if you are unfamiliar with wildcards.)
END Microsoft Specific
We'd love to hear your thoughts. Choose the type you'd like to provide:
Our feedback system is built on GitHub Issues. Read more on our blog.