Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Vector Vector::operator+(const Vector& v1, const Vector& v2) {
- if (v1.size() != v2.size())
- //throw exception
- Vector ret(v1.size());
- for(size_t i=0; i<v1.size(); i++) {
- ret[i] = v1[i] + v2[i];
- }
- return ret;
- }
Add Comment
Please, Sign In to add comment