项目配景
在某一项目中,碰到了需要自制下令系统的需求,而这个模块的复用性很高,因此单独拉出来做一个子项目
更新日记
[2024.10.15 - 10:00] 增
项目进度
----[ 2024.10.15 10:00 ]----
- 首先实现最基础的输入输出功能,用std::getline读入行再分割成字符串数组
- main.cpp
[code]#include #include #include #include #include //for std::strtok#include "cmd_sys.h"//using namespace std; //byte冲突,在后续项目中要用到//封装成模块时,应删掉全部下面的using,制止冲突using std::cin;using std::cout;using std::endl;using std::string;using std::vector;void mainloop(void) { string full_cmd; string cmd; char* arg_; //个人习惯使用"_"作为临时变量名 vector args; while(1) { cout |