cout << a; cout += b;
Do you understand why cout += b can not work?




Posted 15 August 2012 - 10:15 AM
sepp2k, on 15 August 2012 - 09:47 AM, said:
cout << a; cout += b;
cout += b;
Vector2D& Vector2D::operator+=(const Vector2D& right)
{
this->x += right.x;
this->y += right.y;
return *this;
}
This post has been edited by healix: 15 August 2012 - 10:18 AM
Posted 15 August 2012 - 10:26 AM
healix, on 15 August 2012 - 07:15 PM, said:
cout += b;
Quote
Posted 15 August 2012 - 10:30 AM
healix, on 15 August 2012 - 10:15 AM, said:
sepp2k, on 15 August 2012 - 09:47 AM, said:
cout << a; cout += b;
cout += b;
healix, on 15 August 2012 - 10:15 AM, said:
Vector2D& Vector2D::operator+=(const Vector2D& right)
{
this->x += right.x;
this->y += right.y;
return *this;
}
Posted 15 August 2012 - 10:46 AM
cout << a+=b;
a+=b;
cout << a+=b;
Posted 15 August 2012 - 12:30 PM
|
|
Query failed: connection to localhost:3312 failed (errno=111, msg=Connection refused).
|
