#include <iostream>
struct hoge{
int A;
char B;
int C;
double D;
};
template<class T>
T* AddressOf(){
return reinterpret_cast<T*>((std::size_t)0);
}
int main(){
std::cout<<"hoge::A "<<&(AddressOf<hoge>()->A)<<std::endl;
std::cout<<"hoge::D "<<&(AddressOf<hoge>()->D)<<std::endl;
//AddressOf<hoge>()->A = 0xdeedbeef;値を入れると死亡するのでやめましょう。
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgoKc3RydWN0IGhvZ2V7CglpbnQgQTsKCWNoYXIgQjsKCWludCBDOwoJZG91YmxlIEQ7CQp9OwoKCnRlbXBsYXRlPGNsYXNzIFQ+ClQqIEFkZHJlc3NPZigpewoJcmV0dXJuICByZWludGVycHJldF9jYXN0PFQqPigoc3RkOjpzaXplX3QpMCk7Cn0KCmludCBtYWluKCl7CgoJc3RkOjpjb3V0PDwiaG9nZTo6QSAiPDwmKEFkZHJlc3NPZjxob2dlPigpLT5BKTw8c3RkOjplbmRsOwoJc3RkOjpjb3V0PDwiaG9nZTo6RCAiPDwmKEFkZHJlc3NPZjxob2dlPigpLT5EKTw8c3RkOjplbmRsOwoKCS8vQWRkcmVzc09mPGhvZ2U+KCktPkEgPSAweGRlZWRiZWVmO+WApOOCkuWFpeOCjOOCi+OBqOatu+S6oeOBmeOCi+OBruOBp+OChOOCgeOBvuOBl+OCh+OBhuOAggoKCXJldHVybiAwOwp9