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

Child cObj = new Parent()
Wahts the output ?

Answer Posted / donga bangarraju

sorry for the earlier post, this output is giving error like
initializing cannot convert to Paretn* to Child*, if u want
correct this code write like this, this is downcasting or
using RTTI mechanism in C++;

Parent* p =new Child;
Child* obj= dynamic_cast<Child*>(p);

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What does and I oop mean?

1199


How to hide the base class functionality in Inheritance?

1140


Which language is pure oop?

1014


Why do we use inheritance?

1137


What is object in oop with example?

1248


What is object-oriented programming? Webopedia definition

1267


Why do we use polymorphism?

1089


write a program to find 2^n+1 ?

2073


Will I be able to get a picture in D drive to the c++ program? If so, help me out?

2199


What is oops with example?

1054


What is a class and object?

1056


What is difference between abstraction and encapsulation?

1084


what is graphics

2466


Can enum be null?

1025


What is the problem with multiple inheritance?

1170