Posted on 2008-08-29 00:25
T.S Liu 閱讀(559)
評論(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,...)