Lecture overview -- Keyboard shortcut: 'u'  Previous page: Hiding inherited names -- Keyboard shortcut: 'p'  Next page: What about interfaces in C++? -- Keyboard shortcut: 'n'  Lecture notes - all slides and notes together  slide -- Keyboard shortcut: 't'  Help page about these notes  Alphabetic index  Course home  Lecture 4 - Page 8 : 24
Notes about C++
Abstraction Mechanisms, Part 2
Abstract Classes

An abstract class in C++ is a class with one or more pure virtual functions

  • The C++ Programming Language: Page 313
 

  • Abstract class

    • A class is abstract if it has one or more pure virtual functions

    • No objects can be created from an abstract class

    • No abstract modifiers are used on the class, nor on member functions

  • Pure virtual functions

    • A pure virtual function is marked with a 0

      • virtual void vf(double d) = 0;

y:/Kurt/Files/Advanced-programming-cpp/cpp/kn/virtual-member-functions/pure-virtual.ccA variant were vf is a pure virtual function in class A.