что нужно написать чтобы вывести v3 на экран
#include

using namespace std;
struct Vector3
{
int x, y, z;
Vector3()
{}

Vector3(int x, int y, int z): x(x), y(y), z(z)
{}
Vector3 operator + (Vector3 v1)
{
return Vector3(this->x+v1.x,this->y+v1.y,this->z+v1.z);
}
};
int main()
{
Vector3 v1(1, 2, 3);
Vector3 v2(4, 5 ,6);
Vector3 v3;

v3 = v1 + v2;
}
Please enter comments
Please enter your name.
Please enter the correct email address.
You must agree before submitting.

Answers & Comments


Copyright © 2024 SCHOLAR.TIPS - All rights reserved.