#include //for the object cerr #include //for the macro EXIT_FAILURE #include //for the function abs #include "relativistic_rocket.h" using namespace std; const double relativistic_rocket::c {2.99792458e8}; //meters per second relativistic_rocket::relativistic_rocket(double init_length, double init_v) : rocket {init_length, init_v} { if (abs(v()) >= c) { cerr << "Velocity " << v() << " can't be >= the speed of light " << c << ".\n"; exit(EXIT_FAILURE); } }