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

What are references in c++?

1135


Explain the difference between abstract class and interface in c++?

980


Show the declaration for a static function pointer.

1043


How many different levels of pointers are there?

1207


If I is an integer variable, which is faster ++i or i++?

1063


What is a container class? What are the types of container classes in c++?

1255


What is oop in c++?

1074


When does the c++ compiler create temporary variables?

1038


What is friend class in c++ with example?

1023


What is the difference between public, private, and protected access?

1063


What are the methods of exporting a function from a dll?

1222


How to defines the function in c++?

1125


What is c++ try block?

1036


What is the extraction operator and what does it do?

1081


Explain the concept of copy constructor?

1045