\begin{tabular}{|l} Which of the following is not allowed? \\ \( \begin{array}{l}\text { Arrays of pointers to abstract classes. } \\ \text { References to abstract classes. } \\ \text { Multiple pure virtual functions in a single class } \\ \text { Objects of abstract classes }\end{array} \)\end{tabular}
Solución de inteligencia artificial de Upstudy
Responder
Solución

¡Inicia sesión para desbloquear respuestas gratis!
Una plataforma de aprendizaje en la que confían millones de estudiantes y profesores reales.

Respondido por UpStudy AI y revisado por un tutor profesional
Bonus Knowledge
In C++, abstract classes are those that contain at least one pure virtual function, which means the class cannot be instantiated directly. Therefore, trying to create objects of abstract classes is a big no-no! Attempting to instantiate an abstract class will lead to compilation errors, ensuring that the design enforces the use of derived classes. Even though you can't instantiate abstract classes, you can certainly create arrays of pointers to them and define references. This flexibility allows you to manage polymorphic behavior effectively. When dealing with multiple pure virtual functions, it’s perfectly fine - you can have as many as you need within a single abstract class to define the required interface!
