title: How do I call the class's destructor?
body: <p>I have a simple C++ code, but I don't know how to use the destructor:</p>
  
  <pre><code>class date {
  
  public:
      int day;
      date(int m)
      {
          day =m;
      }
  
      ~date(){
      cout &lt;&lt; "I wish you have entered the year \n" &lt;&lt; day;    
      }
  };
  
  
  int main()
  {
    date ob2(12);
    ob2.~date();
    cout &lt;&lt; ob2.day;
    return 0;
  }
  </code></pre>
  
  <p>The question that I have is, <strong>what should I write in my destructor code, that after calling the destructor, it will delete the <code>day</code> variable</strong>?</p>