I need one clarification in C ++ linux.
I have class C1one more class C2. C1will have a link C2.
class C1
class C2
C1
C2
class C1 { C2 &obj ; }
I think of two options here,
C2 &obj;
c2* obj;
What well? what is the difference? when do you choose either?
Avoid using the reference element as much as possible.
, ,, , , , NULL , - , C2 , .
, . , , (=), . , =.
=
( - C2), C2 C1, , , /, .
, , , , .
. , (, ++). . C2 , C1, , , .
Als, , C2 . , , " " .
. - , -, , , .
, , - - . (, ++ Builder / VCL .)
, , - C- ++ .
, , - - . , , , .. const *c2 const obj;
const *c2 const obj;
, , , , , .
: , , - , , , - .
, , .
, - , - . . , .
, .