Linux下命令行解析函数getopt简单使用

之前写一些调试程序的时候解析命令都是使用strtok做分割再判断,偶然间看到由一个getopt函数,能够很快的实现这个功能。函数   #include <unistd.h> int getopt(int argc, char * const argv[], const char *optstring); extern char *optarg; extern int optind,; exte
相关文章
相关标签/搜索