reference to abstract class
问题 What does it mean when there is a reference to an abstract class? I found it in code and I can't understant it. I thought that an abstract class can't be instantiated. How can you give it a reference? 回答1: A reference to an abstract class is just like a pointer to an abstract class: it needs to reference an object of some non-abstract subclass of the abstract class. You can use a reference like that to call virtual methods on the referenced class using the . syntax, in a way similar to a