[Getting started with VC ++] common operators and Microsoft custom types in C ++

Source: Internet
Author: User
C ++ has many types that are not in C #. It is important to understand those types, data types, and some special operators, as a C ++ beginner, you should also write down these things for future reference. This article first records some common operators in C ++ and then lists some data types customized by Microsoft in VC ++. In C ++, A typedef should be used, OK. Let's review these things.

Member OPERATOR: "." is used to access object members. "->" is used to access pointer-type members;

Scope OPERATOR: ":" is used for access between classes and members;

Pointer OPERATOR: Evaluate "*" pointer variable; find the variable address "&" is equivalent to pointer;

Memory Allocation: new initialization class;

Release memory: delete calls the destructor to release the memory;

Memory usage: sizeof;

There are many operators in each language, but for. NET developers, they are different from those in C ++. OK. Below we will list some common types customized by Microsoft in VC ++, which are frequently seen in Windows programming !!

Data Type meaning
Far corresponds to far
Near corresponds to near
Const corresponds to const
Boolean type. The value is true (true) or false (false)
Uint 32-bit unsigned integer, corresponding to unsigned int
Byte 8-bit unsigned integer, corresponding to unsigned char
Word 16-bit unsigned integer, corresponding to unsigned short int
DWORD 32-bit unsigned long integer, corresponding to unsigned long int
Short short integer
Long 32-bit long integer, corresponding to long
Longlong 64-bit long integer
Float float, corresponding to float
Char windows characters
Void of any type
32-Bit String pointer to a constant string
Lpstr 32-Bit String pointer
Lpvoid 32-bit pointer pointing to an undefined Data Type
Lparam 32-bit Message Parameter, used as a parameter of the window function or callback function
Lpresult 32-bit value, used as the return value of the window function or callback function
A 32-bit lpcrect pointer pointing to a constant in the rect structure.
Proc pointer to the callback function
Wndproc 32-bit pointer pointing to a window function
Wparam 16-bit or 32-bit value, used as a parameter of the window function or callback function
Handle object handle, other include Hpen, hwnd, hcursor, HDC, etc.
Const constant
Colorref 32-bit value, representing a color value

OK, the above is the latest VC ++ custom type I have found. We can try them slowly. I think one day I will be able to apply them well, it's easy to understand C ++'sProgramMake your own program.

Related Article

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.