摘要:
int v[] = {0,1,2,3,4}; for (auto i = 0; i m; //创建map for (auto& [key, value]: m) //采用引用方式,避免拷贝,且可执行读写操作 for (auto p = c.begin(); p!= c.end(); ++p) //标准库容器的遍历... 阅读全文
摘要:
// 服务结构体 type Server struct { opts options //可选参数变量 addr string } //可选参数列表 type options struct { A int B string C bool D int } // 为可选参数赋值的函数 type ServerOption func(*options)... 阅读全文