typedef defines a name for a type: int i; // i is an int variable typedef int Fred; // Fred is now another name for int Fred j; // j is an int variable struct creates a data structure typedef struct defines a name for a data structure: typedef struct { double x, y; } Point; // 2D point type Point p, q; // both p and q contain x,y coordinates: p.x, p.y, q.x, q.y Further example: A triangle is defined by three points: typedef struct { Point a, b, c; } Triangle; Triangle t; t contains 3 points: t.a, t.b, t.c each point contains x,y coordinates: t.a.x, t.a.y, t.b.x, t.b.y, t.c.x, t.c.y