Common VC Data Types

Source: Internet
Author: User

Common VC data types (2006.11.26 ):

Description:
Char 1 8-128-127
Signed Char 1 8-128-127
Unsigned char 1 8 0-255
Short int 2 16-32768-32767
Signed short int 2 16-32768-32767
Unsigned short int 2 16 0 to 65535
Int 4 32-2147483648-2147483647
Signed int 4 32-2147483648-2147483647
Unsigned int 4 32 0-4294967259
Long int 4 32-2147483648-2147483647
Signed long int 4 32-2147483648-2147483647
Unsigned long int 4 32 0-4294967259
Long 4 32-2,147,483,648 to 2,147,483,647
Float 4 32 3.4e +/-38 (7 digits)
Double 8 64 1.7e +/-308 (15 digits)
Long double 10 80 1.2e +/-4932 (19 digits)
The following are definitions of common VC Data Types in windef. h:

Typedef unsigned long DWORD;
Typedef int bool;
Typedef unsigned char byte;
Typedef unsigned short word;
Typedef float;
Typedef float * pfloat;
Typedef bool near * pbool;
Typedef bool far * lpbool;
Typedef byte near * pbyte;
Typedef byte far * lpbyte;
Typedef int near * pint;
Typedef int far * lpint;
Typedef word near * pword;
Typedef word far * lpword;
Typedef long far * lplong;
Typedef DWORD near * pdword;
Typedef DWORD far * lpdword;
Typedef void far * lpvoid;
Typedef const void far * lpcvoid;
Typedef int;
Typedef unsigned int uint;
Typedef unsigned int * puint;
Typedef word atom;
1. Use sizeof () to get the number of bytes occupied by any object. For example, if there is a char type variable A, sizeof (a) will return 1.
2. You can also use typedef to define your own data types, such as typedef Myint unsigned Int. Then Myint is equivalent to unsigned Int.

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.