Posted on 2008-08-29 00:25
T.S Liu 阅读(542)
评论(6) 编辑 收藏 引用 所属分类:
C++
总结自己写程序时的变量,函数命名风格!
example :
pointer --> p_+varname; int *p_ivalue = NULL;
typedef --> t_+typenam; typedef struct name t_name
globle variable --> g_+typevarname int g_ivalue = 0;
member variable --> m_+typevarname int m_ivalue = 0;
static variable --> s_+typevarname static int s_ivalue = 0;
temp variable --> typevarname int ivalue = 0;
string varable --> str_varname string str_name;
const string varalbe --> cstr_varname const string cstr_name
function style :
extern int name_name_name(type var_name,...)