Why doesn't polymorphism work without pointers/references?
问题 I did find some questions already on SO with similar title- but when I read the answers they were focussing on different parts of the question which were really specific (e.g. STL/containers).. Could someone please show me why you must use pointers/references for implementing polymorphism? I can understand pointers may help- but surely references only differentiate between pass-by-value and pass-by-reference?? Surely so long as you allocate memory on the heap- so that you can have dynamic