|
|
| TestFriends.C |
ListOfFriends list1; |
![]() | This declaration implicitly calls the constructor
of ListOfFriends that takes no parameters. root will
be simply set to 0 in this case (empty list).
|
| TestFriends.C |
ListOfFriends list2(list1); |
![]() | This declaration is equivalent to ListOfFriends list2 = list1 and causes the copy constructor of ListOfFriends to be invoked which recursively duplicates the binary tree of list1 for list2. |
| TestFriends.C |
ListOfFriends list3; list3 = list1; |
![]() | Firstly, list3 is created using the constructor
of ListOfFriends without parameters. Secondly, the
assignment operator of ListOfFriends performs the
work for list3 = list1.
|
|
| Copyright © 2001, 2002 Andreas Borchert, converted to HTML on February 21, 2002 |