Nested Classes with inheritance

Era Scarecrow rtcvb32 at yahoo.com
Sun Mar 20 01:28:44 UTC 2022


On Saturday, 19 March 2022 at 12:23:02 UTC, user1234 wrote:
> I think OP is learning OOP. His error looks like that for the 
> least.

  True. Looking at the code it shouldn't spaghetti in on itself 
infinitely and is basically clean in his intent.

Inheritance and Polymorphism is one of the hardest things to 
grasp mostly because examples they give in other books of 
'objects' is so far unrelated to software that it doesn't really 
compare. `"An object is like a book which you can read and turn 
the page..."` but then can't tear or burn or hand to a friend or 
put on the shelf upside down, or put your coffee on top of while 
you surf on the web leaving a ring on the book.

  Or comparing inheritance and polymorphism to animals but other 
than overriding the output function to 'meow' or something 
doesn't really help, while comparing to say a bank account 
management or something would be much better.

Maybe I'm just venting on the C++ Primer from 1997 that just 
annoyed me to hell.




More information about the Digitalmars-d-learn mailing list