Questions tagged «wildcard-expansion»

1
C主要参数
我写了一个必须显示主要参数的代码,但是当我编译它并键入“ *”程序时,它显示了我的文件结构。cmd中的命令如下所示:program.exe 1 2 3 * #include <stdio.h> #include <stdlib.h> int main(int argc, char const* argv[]) { for (int i=0; i<argc; i++) printf("%s\n", argv[i]); return 0; } 结果是: program 1 2 3 program.c program.exe 10-03-20 11-02-20 我的问题是:是否可以强制程序打印“ *”而不是列出文件。谢谢建议
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.