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
Note: This blog is reproduced, the source can not be tested (at least for me not to test ...) )The double-colon operator, the scope-scoped operator, scope Resolution operator can access properties and methods overridden in static, const, and
A few days ago in Baidu know inside see someone asked PHP double colon:: The use, at that time to his answer is relatively concise because the phone typing is not convenient! It suddenly comes to mind today, so here's a summary of the double colons
In Ruby, you can use periods (.) and double colons (: :) to call a method. The two methods are different only when the called method name starts with an uppercase letter.
When you call a method using the double colon (: :) method, if the first
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
A few days ago in Baidu know inside see someone asked PHP double colon:: The use, at that time to his answer is relatively concise because the phone typing is not convenient! It suddenly comes to mind today, so here's a summary of the double colons
PHP "::" Double colon function
LAZYCMS:: $sysnameThe first time I saw this expression, what do you mean by double colon?For:A method or property of a direct genus.That is, static method or property use.Domain operators, which are generally used to
1.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,
This is the code development style, in fact, is a function name, equivalent to the underscore division, but read into the package name after the meaning of different. This is defined in accordance with Google's shell development
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
Double colon ":", colon
Scope qualifier or operator,":" It is used to declare the class of the function, and the class is used to declare the member function.
Void Student: display ();
A class Student is declared, and a member function void
A. Identify the level of the scope B. Identify the class to which the member belongsC. Define the scope of a member. D. specify the scope.
Scope Symbol: the class name is generally followed by the member name of the class. c ++ is used as an
(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
The dual-colon Operator is the Scope limitation Operator. Scope Resolution Operator can access static, const, and attributes and methods that are rewritten in the class.
Use the class name for calling when it is used outside the class definition.
A few days ago, I saw someone asking for the use of double colons: in PHP in Baidu. At that time, the answer I gave him was concise because mobile phone typing was not very convenient! Today I suddenly remembered it, so here I will summarize the
the role of double colons in Python [::]
Python sequence Slice addresses can is written as A[start:end:step] and any of the start, stop or end can is drop PED.
The Python sequence slice address can be written as [Start: End: Step], where the start
One: Structure and invocation (instantiation):
Class classname{}, calling: $obj = new ClassName (), and when the class has a constructor, it should also pass in the argument. such as $obj = new ClassName ($v, $v 2 ...);
Two: Constructors and
One: Structure and invocation (instantiation):Class classname{}, calling: $obj = new ClassName (), and when the class has a constructor, it should also pass in the argument. such as $obj = new ClassName ($v, $v 2 ...);two: constructors and
One: Structure and invocation (instantiation):
Class classname{}, called: $obj = new ClassName (), and when the class has a constructor, it should also pass in the parameter. such as $obj = new ClassName ($v, $v 2 ...);
Two: Constructors and
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.