Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- vector &vector::operator+=(const vector &w)
- {
- // To Do
- //
- // Add the vector "w" to this vector. Note that we have to return this vector once we
- // are done to support c++ statement such as v0 = v1 = v2.
- int i = 0;
- while (this) {
- v[i] += w.v[i];
- i++;
- }
- return *this;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement