1. Colon (:) usage(1) Represents the definition of a bit field within a mechanism (that is, the variable occupies several bit spaces)typedef struct _xxx{ unsigned char a:4; Char character a accounts for 4 bits unsigned char c;
Transferred from: http://blog.csdn.net/zimingjushi/article/details/65493901. Colon (:) usage(1) Represents the definition of a bit field within a mechanism (that is, the variable occupies several bit spaces)typedef struct _xxx{unsigned char
Transfer from http://www.360doc.com/content/13/0605/11/3373961_290615318.shtml1. Colon (:) usage(1) Represents the definition of a bit field within a mechanism (that is, the variable occupies several bit spaces)typedef struct _xxx{unsigned char
1. colon (:) usage
(1) indicates the structure body.Bit domain(That is, the variable occupies several bit spaces)
Typedef struct _ XXX {
Unsigned char A: 4;
Unsigned char C;
} Xxx;
(2) The colon following the constructor acts as a segmentation
1. colon (:) usage
(1) represents the definition of the location domain in the structure (that is, the variable occupies several bit spaces)
Typedef struct _ XXX {
Unsigned char a: 4;
Unsigned char c;
} XXX;
(2) The colon following the constructor
(1) denotes the definition of an institution's inner-field (that is, the variable takes up several bit spaces)
Copy Code code as follows:
typedef struct _xxx{
unsigned char a:4;
unsigned char c;
} ; Xxx
(2) The colon at
23. Data abstraction
Good net of the introduction of its outline, not all the eyes and then get--"Han Fei-Chu said right under the"
The question mark grabs to say: "I know: the result of process abstraction is function, the result of data
The following is a description of the use of colon and double colon in C + +, the need for friends can come to reference the next
(1) denotes the definition of an institution's inner-field (that is, the variable takes up several bit spaces)
Copy
1. Colon (:) usage(1) Represents the definition of a bit field within a mechanism (that is, the variable occupies several bit spaces)typedef struct _xxx{unsigned char a:4;unsigned char c;} ; Xxx(2) The colon at the back of the constructor functions
Scope symbol:: The front of the general is the class name, followed by the class is generally the member name, C + + as an example to avoid different classes have the same name of the member and the scope of the way to differentiateFor example: A, B
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.