I am new to c++ static varibles. I don't know how to access the static member of base class from the derived class member function.
Example:
#include <iostream>
class base // base class
{
protected:
static int value;
};
int base::value = 0; // static variable initalization
class derived : public base
{
public:
get_variable();
};
I know that static variable is a class variable. We can only access it by using class name and it is not binded to object (correct me if I'm wrong). My question is how can I access the static variable in the member functions of the derived class get_varible
access the static variable.?