I would build things from the bottom up:
#include "Joint.h"
Joint LeftHip(0);
Joint LeftKnee(1);
Joint LeftAnkle(2);
Joint RightHip(3);
Joint RightKnee(4);
Joint RightAnkle(5);
#inlcude "Leg.h"
Leg LeftLeg(LeftHip, LeftKnee, LeftAnkle);
Leg RightLeg(RightHip, RightKnee, RightAnkle);
#include "Body.h"
Body body(LeftLeg, RightLeg);