Example: Point Data Type
Point.h gives an interface
// representation of Point values
typedef struct { float x; float y; } Point;
// returns distance between two Points
float distance(Point, Point);
// moves a Point by dx,dy
void move(Point *, float, float);
|
Client view: Point + struct, distance(), move()
|