Abstract Defines Instance Member Function
If an object is declared in the definition of a member function of the class then the object can access both the public and private members of the class.
Abstract defines instance member function. Pure virtual functions can be defined for abstract classes but they can be called directly only by using the syntax. Another way to think of each class is that there is an instance side and a static side. Abstract classes are used to represent general concepts for example shape animal which can be used as base classes for concrete classes for example circle dog. A declaration which uses the statickeyword signifies a classvariable.
When we call new and run this function we get an instance of the class. However constructors and destructors for abstract classes can call other member functions. In both java and c the declaration of a member variable data member inside a class definition without use of the statickeyword results in an instance variable in objects of that class. Also note that you have to compile c programs using g because it additionally links the c standard library to your code.
The code shown below does not compile as it says class base defines instance member function def but extended class concrete defines it as instance member property. We cannot create objects of abstract classes. An abstract class is a class that either defines or inherits at least one function for which the final overrider is pure virtual. See the following example.
A pure virtual function or abstract function in c is a virtual function for which we dont have implementation we only declare it. The constructor function also contains all of the static members of the class. A pointer to some object derived from a a instance. A pure virtual function is declared by assigning 0 in declaration.