5/27/09

Describe the main characteristics of static functions.

static member functions just static data members, work for the class as a whole rather than for a particular object of a class.
static member function is associated with a particular class and not with individual objects.

You can call a static member function in the normal way, using dot or the arrow, in association with an object. The real way to call a static member function by itself, without any specific object, using the scope-resolution operator, like this:

Classname::static_functionsname();

A static member function cannot access ordinary data members, only static data members
It can call only other static member functions.
static member has no this pointer.



No comments:

ITUCU