摘要: cpp include include include using namespace std; class ISubject; class IObserver; class Subject; class Observer; class ISubject { private: list observ 阅读全文
posted @ 2019-07-23 11:10 Ruohua3kou 阅读(217) 评论(0) 推荐(0) 编辑
摘要: 1. c_cpp_properties.json 2. launch.json 3. settings.json 4. tasks.json 阅读全文
posted @ 2019-07-23 11:08 Ruohua3kou 阅读(488) 评论(0) 推荐(0) 编辑
摘要: 2019.5.4 更新: 参考了stackflow上的一个问题: "to_string is not a member of std, says g++ (mingw)" ,发现直接换新版mingw即可… "mingw下载地址" ,建议下载压缩包形式的,比较快。安装包太慢太慢了。 之后替换掉旧的mi 阅读全文
posted @ 2019-07-23 11:08 Ruohua3kou 阅读(5542) 评论(0) 推荐(0) 编辑
摘要: 主要考虑两点: 1. 返回值对使用的便利性。 3. 边界,null的判断。 strcat strlen strcmp cpp int m_strcmp(const char des, const char src) { // return 0 des==src , + des src , des 阅读全文
posted @ 2019-07-23 11:07 Ruohua3kou 阅读(220) 评论(0) 推荐(0) 编辑
摘要: 最近在鼓捣wsl,感觉自己用还是蛮好用的。听说1903要更新新的cmd,还蛮期待的 解决步骤: 建议先下载个 "everything" , windows下非常好用的文件查找软件。 1. 启动后搜索 ,找到路径后缀为你默认登录账号的对应的 文件 用编辑器打开后,如果要卸载zsh则搜索zsh,如果是F 阅读全文
posted @ 2019-07-23 11:05 Ruohua3kou 阅读(942) 评论(0) 推荐(0) 编辑
摘要: ```cpp struct cmp {template bool operator()(T const &left, U const &right) { // 以 second 比较。输出结果为 Second 较大的在前 Second 相同时,先进入队列的元素在前。 if (left.second , vector>... 阅读全文
posted @ 2019-07-23 11:03 Ruohua3kou 阅读(1101) 评论(0) 推荐(0) 编辑
摘要: 其主要依靠函数指针来实现,具体看代码吧~ 阅读全文
posted @ 2019-07-23 11:01 Ruohua3kou 阅读(1467) 评论(0) 推荐(0) 编辑
摘要: 一般编译链接c++程序最好使用 g++ ,若有如上的报错信息,需要在gcc后加上 lstdc++ eg: gcc test.c lstdc++ 1. gcc和g++都是GNU的一个编译器。 2. g++:后缀.c的程序和.cpp的程序都会当成是c++的源程序来处理。 gcc:会把.c的程序处理成c程 阅读全文
posted @ 2019-07-23 10:59 Ruohua3kou 阅读(4173) 评论(0) 推荐(0) 编辑