What is the difference between an abstract class and an interface in C++? How do you implement an interface in C++?

Last updated 21 June 2026

  • C++ has no interface keyword. An abstract class has at least one pure virtual function (= 0) but may also hold data and implemented methods.

  • An interface is a convention: a pure abstract class with only pure virtual functions, no data, and a virtual destructor.

  • Implement one by publicly inheriting and overriding every pure virtual method. Multiple inheritance lets a class implement several interfaces.

  • https://utkrusht.ai/blog/cplusplus-interview-questions
  • https://roadmap.sh/questions/cpp
  • https://internshala.com/blog/cpp-coding-interview-questions/
All C++ interview questions