The function points_on_segment_2 generates a set of points equally spaced on a segment given the endpoints of the segment.
#include <CGAL/point_generators_2.h>