文件注释,函数注释等,参考doxygen规模。
/*===================================================== * Copyright (C) 2014 All rights reserved. * * Filename:calculate.c * Author:luqiang * Date:2015/01/12 * Description:this is the description. * ======================================================*/ |
关于数字的指数形式,比如10e9,其类型默认为浮点型,也就是说如果要用这种形式进行整数运行,则必须要进行强制类型转换,如下:
int n; ... int a = n % (10e9 + 7); // 错误,10e9+7 最终类型是浮点型,不可以用于求余运算 int a = n % ((int)10e9 + 7) // 正确 |
待确认:结构体位域按1字节对齐,相邻位域不填充。