Guest User

Untitled

a guest
Jul 19th, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.23 KB | None | 0 0
  1. Vector Vector::operator+(const Vector& v1, const Vector& v2) {
  2. if (v1.size() != v2.size())
  3. //throw exception
  4.  
  5. Vector ret(v1.size());
  6. for(size_t i=0; i<v1.size(); i++) {
  7. ret[i] = v1[i] + v2[i];
  8. }
  9.  
  10. return ret;
  11. }
Add Comment
Please, Sign In to add comment