| <<< Static member function example | Index | Overloading functions >>> |
#include "point.h"
int main()
{
Point pt;
// Correct, but confusing:
// suggests that pt is somehow involved:
pt.set_origin( 0, 0 );
// Better:
Point::set_origin( 0, 0 );
return 0;
}
Animated demo: download and run cjumpcxx.exe , then click
Objects / Static Members
| <<< Static member function example | Index | Overloading functions >>> |