Ask questions and get helpful answers.

class professor {};

class teacher : public virtual professor {};
class researcher : public virtual professor {};
class myprofessor : public teacher, public researcher {};

Referring to the sample code above, if an object of class "myprofessor" were created, how many instances of professor will it contain?

Thank you for using the Jiskha Homework Help Forum, BUT why is this posting labeled "C++?" Sorry, but I do not understand what the sample code has to do with anything? A teacher teaches students but a researcher only does research and does not instruct students. A professor, especially at the university level, usually has an associate teaching the class. Can you clarify exactly what you need?

SraJMcGin this appears to be a C++ programming question, but I'm far to rusty to answer it.

Thank you for using the Jiskha Homework Help Forum. Aha! Thank you, Dr. Here are then some sites that may help:



  1. 👍
  2. 👎
  3. 👁
  4. ℹ️
  5. 🚩

1 answer

  1. only 1 instance of professor will it contain.

    1. 👍
    2. 👎
    3. ℹ️
    4. 🚩

Answer this Question

Related Questions

Still need help?

You can ask a new question or browse existing questions.