04-29-2011, 08:23 AM
What are Static Data Members?
|
What are Static Data Members in c++ 2011?
|
|
04-29-2011, 08:23 AM
What are Static Data Members?
04-29-2011, 08:23 AM
A variable that is part of a class, yet is not part of any object of that class, is called static data member. Static data members are shared by all instances of the class. Static data members do not belong to any particular instance of a class. The life time of static data member is equal to the entire life time of class. When a data member is declared as static, only one copy of the data is maintained for all object of the class.
Example: static int noOfStudents; Best Regards! 0300-9520262 Get solution in 24 hour |cpmputer & internet mileys81:[SIZE="4"][SIZE="3"]....[/SIZE][/SIZE]
|
|
« Next Oldest | Next Newest »
|