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

Explain selection sorting. Also write an example.

982


How does java differ from c and c++?

925


What are the main features of c++?

968


Explain what you mean by a pointer.

1052


Difference between a copy constructor and an assignment operator.

933


What is exception handling? Does c++ support exception handling?

972


How can you link a c++ program to c functions?

1059


find the two largest values among the 6 numbers using control structures : do-while,for,if else,nestedif- else ,while. one or two of them.

2467


What are the types of container classes?

1085


What are pointers, when declared, intialized to a) NULL b) Newly allocated memory c) Nothing. Its random

1071


Is dev c++ free?

966


What are the advantages of using friend classes?

1081


How to declaring variables in c++?

1105


what are the decision making statements in C++? Explain if statement with an example?

1033


Is there any function that can skip certain number of characters present in the input stream?

1012