Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Why we can't create the object of abstract class ?

Answer Posted / abhishek ajmera

When we declare a pure virtual function like this:-

Virtual PureVirtualFunction()=0;

This indicates compiler to reserve a slot for Function in VTABLE but don’t put an address in that particular slot. If only one function in a class is declared as pure virtual, the VTABLE is incomplete.
If the VTABLE for a class is incomplete, compiler cannot safely create an object of a pure abstract class, so you get an error message from the compiler if you try to make an object of a pure abstract class. Thus, the compiler ensures the purity of the abstract class, and you don’t have to worry about misusing it.

Is This Answer Correct ?    10 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why we use extension methods in c#?

812


Explain About Assembly in .NET, types of assemblies, their difference, How to register into GAC. How to generate the strong names & its use.

971


What are sorted lists?

850


What is new method in c#?

873


Explain get and set accessor properties?

843


Explain about finalize method?

879


What does void mean in c#?

910


How many types of collections are there in c#?

850


What is the difference between int and int in c#?

934


What is difference between Trace and Debug

1020


What is a protected class in c#?

895


Can an array be null c#?

893


What is datetime parse in c#?

893


Can a string be null c#?

842


Is equal in c#?

818