Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Add two polynomials together
- *
- * @overload operator +=
- * @return A refrence to this object
- */
- const Polynomial& Polynomial::operator +=(const Polynomial& other)
- {
- std::vector<double> test(1,1);
- std::cout << test[0] << '\n';
- test[0] = 5;
- std::cout << test[0] << '\n';
- // Add the vectors together
- for(int i = 0; i < this->terms.size(); ++i)
- this->terms[i] += other.terms[i];
- return *this;
- }
Add Comment
Please, Sign In to add comment