-> is called the indirect reference operator in the C language, and is a two-mesh operator, with the precedence of the member operator ".".
usage:
p->a, where p is a pointer to a struct body, and a is a member of this struct type. The expression P->a refers to member A of the struct that the pointer p points to.
For example:
struct T
{
int A;
Char b;
}s;
struct t* p=&s;
So
P->a is equivalent to S.A.
Obviously, there is an equivalent notation: (*p). A, and P->a is exactly equivalent.
---------------------------
The use of 2.&
1. Take the address. Monocular operator. The address used to take a variable.
Like what
| 1 2 |
int I, *p; p = &i; The & function here is to take the address of the variable i. |
3.:: The role:
Representing scopes, and owning relationships
Like what
Class A
{
Public
int test ();
}
int a::test ()//indicates that test belongs to a
{
return 0;
}
Similarly, there are other things that are not listed
--------------------
Like what
int A;
void Test ()
{
int a =:: a;//with global variable A, assign value to local variable a
}