正在加载图片...
Coding Style(Cont) )救中国研究院 Use all uppercase with underscores for macro define MY MACRO NUMBER 100 Declare all your variables at the start of function Avoid hard coding constant. Use enum or macro define MY MAX LENGTH 1024 User braces for one line code 工E(mf工 nitia1ized) hr = S OK; Limit the length of a single function9 Coding Style (Cont.) • Use all uppercase with underscores for macro. #define MY_MACRO_NUMBER 100 • Declare all your variables at the start of function. • Avoid hard coding constant. Use enum or macro. #define MY_MAX_LENGTH 1024 • User braces for one line code If (m_fInitialized) { hr = S_OK; } • Limit the length of a single function
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有