摘要:
## .vimrc ``` "通用配置" set title let mapleader=";" "快捷键前置 set nocompatible "不兼容原始vi模式" filetype on "开启文件类型检测 filetype plugin on "开启文件类型插件检测 set noeb "关闭 阅读全文
摘要:
## 1. 概念 模板是对类型的抽象,为了更好的实现多态的思想。 模板分为类模板和函数模板。 ## 2. 函数模板 就是在函数之前声明一下模板,然后执行的时候,函数自行判断推导类型。 ```cpp int add(int a, int b) { return a + b; } double add( 阅读全文
摘要:
# bind bind 是C++ 的一个函数, 用来绑定其他函数,用来改造。 ## 1. 普通函数的bind 普通函数可以被绑定,传参。 ```cpp int add(int x, int y){ cout using std::bind; int main(){ auto f = bind(&ad 阅读全文