The TypeDef for iOS learning notes

Source: Internet
Author: User

typedef unsigned long long weiboid;

typedef defines a user-friendly type, which is called "macro definition".

Unsigned long long is an unsigned length-length integer. This should be the case, unsigned long long int, where int is omitted, the compiler will automatically recognize it.

Unsigned long long, is a 64-bit data, 8 bytes, unsigned, with a value range from 0 to 2 of 64 times-1.

unsigned long, which is 32 bits of data, 4 bytes, unsigned, with values ranging from 0 to 2 of 32 times-1.

Each of the integers has unsigned (unsigned) and signed (signed) types (float and double are always signed), and the integer variable declared by default is a signed type (char is a bit special). If you want to declare an unsigned type, you need to add unsigned before the type. The difference between unsigned and signed versions is that unsigned types can hold twice times the data of a signed type, such as the range of data that an int in a 16-bit system can store is -32768~32767, and the range of data that unsigned can store is 0~65535. Because in a computer, integers are stored in the form of complement. Depending on the highest bit, if it is 1, the number of symbols is negative, and if it is unsigned, it is interpreted as a positive number. At the same time, the range of integers that can be expressed in the same number of digits becomes larger. In addition, if unsigned omits the latter keyword, most compilers will think of it as unsigned int.

The TypeDef for iOS learning notes

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.