Static member functions are called by referencing its containing class without using an object.
The following code snippet illustrates the use of static member functions.
Test::set_number(22);
Test::print_number();
where set_number() and print_number() are static functions and they are defined as follows in the class Test:
static void set_number(int arg) {
si = arg; // si is an int var
}
static void print_number() {
cout << "Value of si = " << si << endl;
}