wargetopt.h
来自「ftpserver very good sample」· C头文件 代码 · 共 42 行
H
42 行
/* WarGetopt implements a tread-safe getopt_long() function, using the same source as the generic C port of the function. The class implementation is designed for C++ classes that parses command-line options.*/#ifndef WAR_GETOPT_H#define WAR_GETOPT_H#include "jgaa/getopt.h"#define WAR_GETOPT_CLASSclass WarGetopt{public: WarGetopt() : optarg(NULL), optind(0), opterr(1), optopt(0), opt_idx(0) {} int GetoptErr(int ch, int arg, const char *parg); int GetoptLong(int argc, char * const argv[], const char *optstring, const struct option *longopts, int *longindex); const char *optarg; int optind, opterr, optopt;private: int opt_idx;};#endif // WAR_GETOPT_H
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?