I am a little doubtful about your code. Why does CarNode inherit from
Car and it also composes it ?
Note that in c++ objects is by default passed by value and Not passed by
reference. You may wan't to read about pointers and reference in c++.
Reputation Points: 840
Solved Threads: 594
Senior Poster
Offline 3,865 posts
since Dec 2008