Skip to main content

Static Data Members in C++


Static Data Members

In this tutorial you will learn: 1. What are Static Data Members? 2. Why to use Static Data Members? 3. How to use Static Data Members in program? 4. Basic C++ syntax What are Static Data Members? Static members are those data members that retain their value , whenever the static member is reused in the program. Static data members store the latest value in them so that the value will be used for next time when the function that makes use of static data member is called. The lifetime of the static data members is equal to the lifetime of the program. Static data

Add new comment

Code File
File attachments