Linux -- C語言中的命令行解析函數getopt()

#include <unistd.h>//頭文件 int getopt(int argc, char * const argv[ ], const char * optstring);//函數聲明 agrc, argv[] —main()函數傳遞過來的函數 optstring: 一個包含準確選項字符的字符串 返回值: 返回下一個選項, 當沒有參數的最後一次調用時, getopt()將返回 -1;當
相關文章
相關標籤/搜索