Abstract class vs Interface in C++

Manish Sonal
2 min readJul 4, 2020

--

It is often confusing when it comes to interface and abstract class in C++. There are no keyword to define an interface and abstract classes in C++, as in other programming languages like Java or C#.

Yet, the use of interface and abstract class can be achieved in C++ similar to other languages.

First let us compare the concept of interface and abstract class

  1. Interface class does not have any method implementation. It only has method declarations and the class that implements an interface implement the methods.

--

--

Manish Sonal

Cosultant@Google, Ex Sr. ML Researcher, Ex-Microsoft & still learning !