<<< | Index | >>> |
struct Point { int x; // member variables int y; void adjust( int x_, int y_ ) // member function { x += x_; y += y_; } }; void main() { Point p; // instantiate object p.x = p.y = 4; // access member variables p.adjust( 1, 1 ); // call member function }
<<< | Index | >>> |