Firstly, if this code comes from a book, you will get another book:
- , BagOfApples BagOfFruit ( , , BagOfApples BagOfFruit, , )
- :
- ... , .
insert() , , . . - , ( - , - ).
remove() , . Comp Sci pop() .
, :
{ return (Apple&) BagOfFruit::remove(); }
, remove() "" /, C- promises , - Apple. , , BagOfApples, , BagOfFruit, , - BagOfFruit - . Apple&, Apple, - Apple, undefined.
, , , , . , "const char *" , . , , a Banana: ar[0] , , ar[1] ( 32- int 64- ) const char*, . , . , , , undefined .