The basic data type "C + +"

Source: Internet
Author: User

Base type: integer, character, real (floating point [single precision, double]), enum-type

Pointer type

Constructed type: array type, struct type, common body type

Empty type

Explain:

Basic Data Type : The main feature of the basic data type is that its value cannot be decomposed into other types. In other words, the basic data type is self-explanatory.

construct data type: Constructs a data type that is defined by a constructed method, based on one or more defined data types. That is, a value of a constructed type can be decomposed into several "members" or "elements". Each "member" is either a basic data type or another constructed type.

pointer type : A pointer is a special, yet important, data type. Its value is used to represent the address in the memory of a variable. Although the value of a pointer variable is similar to an integer, this is a completely different amount of two types and cannot be confused.

NULL type : When calling a function value, a function value should normally be returned to the caller. The returned function value is of a certain data type, and should be given in the function definition and function description, for example, in the definition of the MAX function in an example, the function head is: int max (int a,int b), where the "int" type specifier means that the return value of the function is an integral type. However, there are also a class of functions that, when called, do not need to return a function value to the caller, which can be defined as "null type". Its type specifier is void. The following functions are also described in detail.

The basic data type "C + +"

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.