C++ Programming - Objects and Classes - Discussion
Discussion Forum : Objects and Classes - General Questions (Q.No. 5)
5.
How can we make a class abstract?
Discussion:
9 comments Page 1 of 1.
Hemant said:
8 years ago
Can you give me a syntax?
Vahid said:
10 years ago
Can we define at least one method in abstract class?
Kavya said:
1 decade ago
Abstract class is one which does not have any object and in which we can only declare the function but cannot define it.
So by making at least one pure virtual function we can define it in its derived class and by making object of that derived class we can access that function.
So by making at least one pure virtual function we can define it in its derived class and by making object of that derived class we can access that function.
(1)
Keshav said:
1 decade ago
Abstract class is the one which doesn't have any object. And pure virtual function is the one which doesn't have any definition in the base class but it is overridden in derived class.
So by defining pure virtual class, how can we make it abstract because we can still create an object of the class and make it normal class.
So by defining pure virtual class, how can we make it abstract because we can still create an object of the class and make it normal class.
Kavi said:
1 decade ago
What is mean by least member function?
Maake Lethabo said:
1 decade ago
OK then what is the different between the static keyword and pure virtual class?
Saurabh said:
1 decade ago
Ya it means pure virtual class.
Giri said:
1 decade ago
Abstract means pure virtual class.
Ajay said:
1 decade ago
What you actually mean by abstract?
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers