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

What is the use of static functions?

Answer Posted / reejusri

Static function is basically used in creating factory
objects.
You can make your constructor private and expose static
function. And user can use the static methods to create the
object of that class.
Using NONSHARABLE_CLASS you can restrict the usage of
static functions/method also.

Is This Answer Correct ?    15 Yes 16 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Where the memory to the static variables is allocated?

1105


What does asterisk mean in c++?

1164


Explain the virtual inheritance in c++.

1113


What is an adaptor class in c++?

1289


What can c++ be used for?

1162


Why is c++ called oops?

1273


What is null and void pointer?

1111


Discuss the effects occur, after an exception thrown by a member function is unspecified by an exception specification?

1131


What is the use of seekg in c++?

1097


Give example of a pure virtual function in c++?

1243


What is the difference between while and do while loop?

1205


What is the size of integer variable?

1101


Why are arrays usually processed with for loop?

1287


What is the difference between a baller and a reference in C++?

1173


Can you declare an array without a size in c++?

1068