⧼⧼  Previous Page
⧼  Table of Contents  ⧽
Next Page  ⧽⧽

Pure-Virtual Methods

Computer Programming C++ / Object Oriented Programming

Before we get into the concept of pure-virtual, it's improtant to conceptualize the idea of an abstract class.

Let's make our Animal class abstract!

Review Questions

The following are examples of questions similar to what you can expect to see on the next exam.

Hover over a question to show the answer.
  1. What does making a method pure-virtual do? Means it MUST be overridden. (Makes the class abstract)
  2. What is the syntax for a pure-virtual function? virtual void DoSomething() = 0; //(Does not have to be void)
⧼⧼  Previous Page
⧼  Table of Contents  ⧽
Next Page  ⧽⧽
© Ryan Appel