You seem to be a victim of the Most Vexing Parse. Basically, the line
trajectory_data d1();
is actually declaring a function d1 that takes no argument and returns a trajectory_data
object.
Changing it to
trajectory_data d1;
should fix your problem, same for d0
. The default constructor will be called anyways, no need for the ()
.