개요.. |
헝가리안 표기법은 "구시대의 유물이니 쓰지 말아야 한다"라는 주장과 "대규모 프로젝트, 코드파악이 잘된다."등의 논란은 많지만 사용을 잘 하면 코드 분석(가독성) 및 작성에 매우 도움이 되는 코딩 방법론입니다.
헝가리안 표기법 정리.. |
Hungarian Notation
Data Type |
Prefix |
Example |
Boolean |
b |
bContinue |
Int |
n |
nIndex |
Short |
n |
nIndex |
Character |
c |
cFirstInitial |
Float |
f |
Percent |
Double |
d |
dMetres |
Long |
l |
lCarCount |
String |
s |
sCustomerName |
Null terminated String |
sz |
szCustomerName |
Unsigned Integer (Word) |
w |
wCount |
Unsigned long integer (DWORD) |
dw |
dwAtomCount |
Pointer |
p |
pNext |
Handle |
h |
hWnd |
Function |
fn |
fnReport |
Class |
C |
CParser |
Class member variable |
m_ |
m_ |
Array |
a |
aYears |
Global |
g_ |
g_szDirectory |
Windows message |
Msg |
msgCut |
Windows Resources
Resource Type |
Prefix |
Example |
Menu Item Resource |
ID_ |
ID_EDIT_CUT |
String |
IDS_ |
IDS_STRING1 |
Dialog Control |
IDC_ |
IDC_EDITBOX |
ICON |
IDI_ |
IDI_MAINICON |
Cursor |
IDC_CURSOR_ |
IDC_CURSOR_ARROW |
Dialog Box |
IDD_ |
IDD_ABOUTBOX |
Accelerator |
IDR_ |
IDR_ACCELERATOR |
Bitmap |
IDB_ |
IDC_ARROW |
여기까지는 매우 오래전에 http://www.codeproject.com/ 에서 구한것 으로 생각됨
Kyuseo 확장
Data Type |
Prefix |
Example |
LongLong |
ll |
m_llBigCount |
BYTE |
by |
bySingle |
WORD |
w |
wSpeed |
__int64 |
n |
nCount |
INT_PTR |
n |
nIndex |
Clist, 각종 list |
list |
listName |
Carray, 각종 array |
a |
aString |
CMap, 각종 map |
map |
mapUserInfo, apUserInfoFromId, |
CVector, 각종 vector |
v |
vBook |
CBitmap |
bmp |
bmpOver |
CSurface |
sur |
surChar |
Animation |
ani |
aniTimer |
Sprite |
spr |
sprMouse |