#include <iostream>
using namespace std;
template <typename T>
class Node
{
T* m_data;
Node* next;
public:
Node(T*, Node<T>*);
~Node();
void Delete (Node<T>* head);
};
template <typename T>
Node<T>::Node(T* n, Node<T>* head)
{
this->m_data = n;
this->next=head;
}
template <typename T>
Node<T>::~Node()
{
}
template <typename T>
void Node<T>::Delete(Node<T>* head)
{
while(head)
{
delete(head->m_data);
//head->m_data->~data();
head=head->next;
}
}
int main() {
Node<int> x(0,0);
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgoKdXNpbmcgbmFtZXNwYWNlIHN0ZDsKCnRlbXBsYXRlIDx0eXBlbmFtZSBUPgpjbGFzcyBOb2RlCnsKICAgICAgICBUKiBtX2RhdGE7CiAgICAgICAgTm9kZSogbmV4dDsKICBwdWJsaWM6CiAgICAgICAgIE5vZGUoVCosIE5vZGU8VD4qKTsKfk5vZGUoKTsKdm9pZCBEZWxldGUgKE5vZGU8VD4qIGhlYWQpOwogfTsKCiAgdGVtcGxhdGUgPHR5cGVuYW1lIFQ+CiAgTm9kZTxUPjo6Tm9kZShUKiBuLCBOb2RlPFQ+KiBoZWFkKQogIHsgCiAgICB0aGlzLT5tX2RhdGEgPSBuOwogICAgdGhpcy0+bmV4dD1oZWFkOwogIH0KCiAgdGVtcGxhdGUgPHR5cGVuYW1lIFQ+CiAgTm9kZTxUPjo6fk5vZGUoKQogIHsgCiAgfQogIAogIHRlbXBsYXRlIDx0eXBlbmFtZSBUPgogIHZvaWQgTm9kZTxUPjo6RGVsZXRlKE5vZGU8VD4qIGhlYWQpCiAgewogICAgd2hpbGUoaGVhZCkKICAgewogICAgICAgICAgICBkZWxldGUoaGVhZC0+bV9kYXRhKTsKICAgICAgICAgIC8vaGVhZC0+bV9kYXRhLT5+ZGF0YSgpOwogICAgaGVhZD1oZWFkLT5uZXh0Owp9CiB9CgppbnQgbWFpbigpIHsKTm9kZTxpbnQ+IHgoMCwwKTsJCglyZXR1cm4gMDsKfQ==