C++学习笔记(10)
1.编程规范:
①头文件需注释引用了什么函数,有什么作用;
②特殊缩写的自命名变量需要有注释;
③当case语句需要执行完case1后继续执行case2而不break的时候需要有注释;
④当变量命名时,局部变量与全局变量的含义(名字)重复,则局部变量可以命名为liv_xxx。(local(局部变量);interger(数据类型);variabal(变量))
⑤说明:下面是一些在软件中常用的反义词组。
add / remove begin / end create / destroy
insert / delete first / last get / release
increment / decrement put / get
add / delete lock / unlock open / close
min / max old / new start / stop
next / previous source / target show / hide
send / receive source / destination
cut / paste up / down