- Member Access Operators: . and ->
值==》 【.】
地址==》【->】
- postfix-expression . member
In the first form, postfix-expression represents a value of struct, class, or union type, and name names a member of the specified structure, union, or class. The value of the operation is that of name and is an l-value if postfix-expression is an l-value.
- postfix-expression -> member
e->member ====(*e).member (e is a pointer to a structure or union)
In the second form, postfix-expression represents a pointer to a structure, union, or class, and name names a member of the specified structure, union, or class. The value is that of name and is an l-value. The –> operator dereferences the pointer. Therefore, the expressions e –>member and (* e ).member (where e represents a pointer) yield identical results (except when the operators –> or * are overloaded)
2.Scope Resolution Operator: ::
:: identifier class-name :: identifier namespace :: identifier
The identifier can be