⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 commline.h

📁 自编的一个String类
💻 H
字号:
//file commline.h#include "str.h"// class for decoding command line parameters// if first string begins with - or / assume it is options// assume all options form a single stringclass CommandLine{   int the_argc;   char** the_argv;   bool options;                // true if first arg begins with - or /   int n_args;                  // number of argumentspublic:   CommandLine(int an_argc, char** an_argv);   int argc() { return the_argc; }   char** argv() { return the_argv; }   String GetArg(int i);        // get i-th arg (1 = first arg after options)   String GetOptions();   int NumberOfArgs() { return n_args; }  // no. of args excl .exe and options   bool Options() { return options; }                                // true if there are options   bool HasOption(const String& s);                                // true if options has any char in s};// body file: commline.cpp

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -