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...

How to create a pure virtual function?

Answer Posted / hrpynux@gmail.com

You declare a pure virtual function by using a pure specifier ( = 0 ) in the declaration of a virtual member function in the class declaration. Class A is an abstract class. The compiler would not allow the function declarations A g() or void h(A) , declaration of object a , nor the static cast of b to type A .

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How many types of comments are there in c++?

989


How should a contructor handle a failure?

1195


What is the use of setprecision in c++?

1017


Where can I run c++ program?

1068


Explain the isa and hasa class relationships. How would you implement each?

1132


What is type of 'this' pointer? Explain when it is get created?

1017


What is the keyword auto for?

1041


What are function prototypes?

1246


How do you decide which integer type to use?

1008


Differentiate between the message and method in c++?

1075


What is a unnitialised pointer?

1089


What is the use of endl in c++ give an example?

1171


Do you know the problem with overriding functions?

1109


If a function doesn’t return a value, how do you declare the function?

1062


What does h mean in maths?

1218