static member function program in c++
Answers
Answered by
5
Answer:
Just like static data member, static member function is also a class function; it is not associated with any class object. In above program X and Y are two static data members and print() is a static member function. According to the rule of static in C++, only static member function can access static data members.
Answered by
3
Answer:
Just like static data member, static member function is also a class function; it is not associated with any class object. In above program X and Y are two static data members and print() is a static member function. According to the rule of static in C++, only static member function can access static data members.
Similar questions
Social Sciences,
5 months ago
Math,
5 months ago
Math,
11 months ago
Chemistry,
11 months ago
Chemistry,
1 year ago