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 avoid a class from instantiation?

Answer Posted / rsn

Yes, I agree with Ravi. Classes can be prevented from
instantiating and also from getting inherited using provate
constructors. The initialisation can be done using member
functions in which case it is called "clone" functions(I
hope so, Pls correct me if i'm wrong!).

Is This Answer Correct ?    2 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is runtime polymorphism in c++?

1227


Is it possible for the objects to read and write themselves?

1167


What is while loops?

1099


Explain about templates of C++.

1202


What is the use of dot in c++?

1129


How do you define/declare constants in c++?

1107


Will c++ be replaced?

1101


Using a smart pointer can we iterate through a container?

1143


What is the difference between #import and #include?

1104


What is an arraylist c++?

1273


Snake Game: This is normal snake game which you can find in most of the mobiles. You can develop it in Java, C/C++, C# or what ever language you know.

3064


What is cout flush?

1080


Can we sort map in c++?

1081


What does it mean to declare a member function as virtual?

1121


what are the iterator and generic algorithms.

1990