#include <iostream>
using namespace std;

struct A
{
	int& a;
};

int main() {
	int a = 5;
	cout << (void*)&a << ' ';
	A* b = nullptr;
	{
		
		int& c = a;
		cout << (void*)&c << ' ';
		b = new A{ c };
		
		int* d = (int*)((void*)b);
		*d = 0;
		cout << "ref address: " << (void*)d << ' ';
		
	}
	cout << (void*)&(b->a) << ' ';
	
	// your code goes here
	return 0;
}