Documente Academic
Documente Profesional
Documente Cultură
volatile
Static – class variables
static class variable is shared by all the class
objects
it exists even if there is no (yet) any object of
its class
we may access it using the scope operator
class ST
{
static int s; // declaration only
int i;
public:
static int ps; // as above
};
// i=ST::s; // private
i=ST::ps;
ST::count_us();
// ST::all(); // non-static method
ST a;
ST::count_us();
a.count_us();
a.all();
}
const, volatile
const
volatile
public:
info();
info(const info & i);
~info();
info & operator=(const info &p);
};