Hungarian Naming Act

Source: Internet
Author: User
Tags integer

This method may have been heard by many people, including me, some people also try to use it, but still feel good, but now it seems that the idea is wrong. Explain it again. These symbols can be used at the same time, in order to first m_, (this tag refers to the member variable) and then pointers, then simple data types, and so on. For example: M_lpszstr, represents a long pointer member variable that points to a string ending in 0 characters.

A Array

b Boolean

by Byte

C Char//signed character

CB Char Byte//unsigned character (not much use)

CR COLORREF//Color reference value

Cx,cy length of X,y (shortint)//coordinate difference (length)

DW Double Word

FN Function

H Handle

I Integer

M_ member of a class

n Short Integer

NP Near pointer

P Pointer LP Long pointer

S String

SZ string with Zero end//string ending with character ' "

TM text//text content

W Word

X,y coordinate//coordinates

Class names generally do not have descriptive characters, such as Theapp. Add m_ to other classes. Note that some classes also have abbreviations similar to the Hungarian nomenclature. For example: CStatusBar M_wndstatusbar, where the WND represents the window class, but this nomenclature is not part of the standard Hungarian nomenclature.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.