#include <iostream>
using namespace std;

struct ivec3
{
	int x, y, z;
	ivec3(int x, int y, int z) : x(x), y(y), z(z) { }
};

ostream& operator <<(ostream& stream, const ivec3& v)
{
	return stream << "(" << v.x << ", " << v.y << ", " << v.z << ")";
}

int main() {
	ivec3 v(11, 22, 33);
	cout << "Изначальный вектор: " << v << endl;
	cout << endl;

	cout << "Размер int в байтах: " << sizeof(int) << endl;
	cout << "Адрес v: " << reinterpret_cast<uintptr_t>(&v) << endl;
	cout << "Адрес v.y: " << reinterpret_cast<uintptr_t>(&v.y) << endl;
	cout << "Адрес v.z: " << reinterpret_cast<uintptr_t>(&v.z) << endl;
	cout << endl;

	cout << "Изменение v.y на 55 по вычисленному адресу..." << endl;
	*reinterpret_cast<int*>(reinterpret_cast<uintptr_t>(&v) + sizeof(int)) = 55;
	cout << "Новый вектор: " << v << endl;
	return 0;
}