I\'m writing a Line class to make numerical methods and I want these operators (*, +, -) to make my code more readable and easier to understand.
Surely the correct thing is to have a Vector object INSIDE line, and not "inherit" from Vector? Generally inheriting from std::
containers is not a great data... I'm pretty sure a "Line" is not actually a vector, it's a "has a" vector. [The rule for "when you inherit" is "X is a Y", where you make a composite object when "X has a Y" - so there is a Y inside X.]
You will need to declare your constructor and destructor to get rid of your linking error.
I would also use const Line&
as your input to the math operations, as you neve alter the input.