<<< | Index | >>> |
Static member functions also belong to the class
Objects can be used to call these functions (but this is confusing).
Static member functions can be called without an object.
Static member functions don't have a this pointer.
And they cannot refer to non-static members in any way.
// point.h class Point { static int m_x_origin; static int m_y_origin; static void set_origin( int x_, int y_ ); //... }; // point.cpp void Point::set_origin( int x_, int y_ ) { m_x_origin = x_; m_y_origin = y_; }
<<< | Index | >>> |