title: How to compare user date with system date in c++?
body: <p>I  have taken in date from the user in DD/MM/YEAR formate but I want to compare it with system date and want to know whether the date entered by the user is in future or past !! </p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;ctime&gt;
  
  int main ()
  {      
      char date [10],sysdate[10];
      cout&lt;&lt;"enter Date";           
      cin&gt;&gt;date;                   //for taking date from user
      _strdate(sysdate);      //for getting system date(given in DD/MM/YY    
      cout&lt;&lt; sysdate;        //prints system date    
  }
  </code></pre>