
- Forum
- Programming Talk
- C and C++
- Struck Abstract with Abstract Class
Results 1 to 3 of 3
Struck Abstract with Abstract Class
This is a discussion on Struck Abstract with Abstract Class within the C and C++ forums, part of the Programming Talk category; Hi, I think we cannot define objects for an abstract class.If my thinking is correct my mind poses the question ...
-
Struck Abstract with Abstract Class
Hi,
I think we cannot define objects for an abstract class.If my thinking is correct my mind poses the question what is the need of having Abstract classes.Can someone help me out??
Sripriya
-
Yes you are right. Abstract types can never be created. Unlike concrete classes, they merely specify an interface to an object, not an object itself. All you can do with an abstract type is to declare a variable to be of that type. Such a variable can point to any actual object which is a subtype of that abstract class. So abstract classes, do not define objects.
-
From the reason for abstract classes not defining objects provided itself, the need for abstract classes is visible. The body of an abstract class definition consists of a semicolon separated list of signatures. Each specifies the signature of a method without providing an implementation at that point. The argument names are required for documentation purposes only and are ignored.
-
Sponsored Ads

Reply With Quote