8: -
:
8.1.
8.2.
8.3
. ++
- .
.
. , Panda Bear, Bear ZooAnimal.
,
IntArray.
- , draw() ZooAnimal subscript
.
,
. .
-
( ) .
.
8.1.
. , ,
, Complex:
extern
Complex& sqrt( Complex& );
. .
,
.
.
,
ff( Bear& );
ff( Panda& );
Panda yingYang;//
exact match : ff( Panda& )
ff( yinYang );
.
.
,
.
// warning : cannot be distinguished// by
the argument matching algorithm ff( Panda );
ff( Panda& );// ok : ff(
Panda& )
int (*pf)( Panda& ) = ff;
ff( yinYang ); // error :
ambiguous
pf( yinYang ); // ok