2018年10月8日

tips___代码规范

摘要: 函数变量尽可能置于最小作用域内,并在变量声明时进行初始化 变量声明的位置最好离第一次使用的位置越近越好;应使用初始化的方式代替声明再赋值。 int x=0; rather than int x; x=0; // vector<>int v={1,2}; rather than vector<int> 阅读全文

posted @ 2018-10-08 20:57 一只小毛球 阅读(263) 评论(0) 推荐(0) 编辑

导航