fork(1) download
#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;
}
Success #stdin #stdout 0.02s 2676KB
stdin
Standard input is empty
stdout
Standard output is empty