可可西

2014年2月8日 #

使用getopt函数对windows命令行程序进行参数解析

摘要: getopt()是libc的标准函数,很多语言中都能找到它的移植版本。// -b -p "c:\input" -o "e:\test\output"bool bBinary = false;char szPath[MAX_PATH] = {0};char szOput[MAX_PATH] = {0};int c = 0;while ((c = getopt(argc, argv, "bp:o:")) != -1) { switch (c) { case 'b': bBinary = true; break; case 阅读全文

posted @ 2014-02-08 19:15 可可西 阅读(4612) 评论(0) 推荐(1) 编辑

导航