++ , . , .
: struct type_list {
type data;
type_list * next;} *list_1;
list_1= new type_list;
1 2 3
list_→ dat data data
next next next = 0
list_1 ; data type; next type_list 0.
, .
, (), . , , (, , , ..).
:
1. ;
2. ;
3. ;
4. ;
5. ;
6. ;
7. ;
8. , ;
9. ;
10. .
.
1. ? .
2. .
3. ?
4. , ?
5. ?
IV
: , ; ; .
, , , .
:
class _ {public: //
----- ------ -------
----- ------ -------
protected: //
----- ------ -------
----- ------ -------
private: // ,
----- ------ -------
----- ------ -------
};
public, protected private , .
, .
, , . , , .
. →, (), (), .
|
|
, , friend. . , , ::.
:
class A {-----
friend int B:: f(); // f() - ,
};
class C {----
friend class B; //
};
class D {----
friend D f(D); // f() - , D
};
this
this . . :
class_type * const this.