【发布时间】:2012-12-28 22:59:46
【问题描述】:
我想创建一个接受形式参数的 C 程序
-aK
其中 K 是 0-9 之间的某个整数。
我将如何解析/指定此选项?
【问题讨论】:
-
使用
getopt?还是bsd-getopt_long? -
你知道 gnu getopt() 吗?
-
使用
getopt后,尝试接受超过18% ;-)
标签: c command-line-arguments getopt getopt-long