Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
现在有几次,我遇到过这样的代码:
int main(argc, argv) int argc; char **argv; { ... }
为什么都以这种argc方式argv声明?
argc
argv
这是用于 K&R*样式参数列表的语法。
* K&R - Brian Kernighan 和 Dennis Ritchie,《C 编程语言》一书的作者。 Dennis Ritchie还是 C 编程语言和 UNIX 操作系统 Ken Thompson 的创造者。