title: c pointer error , get current time
body: <p>I'm a beginner in C , can you explain for me please how to fix this error.</p>
  
  <pre><code>#include &lt;Windows.h&gt;
  #include &lt;stdio.h&gt;
  
  int *getDate()
  {
      SYSTEMTIME str_t;
      GetSystemTime(&amp;str_t);
  
      int tab[3];
      tab[0]=str_t.wDay;
      tab[1]=str_t.wMonth;
      tab[2]=str_t.wYear;
  
      return tab;
  }
  
  struct node
  {
      int *date= getDate();
  };
  
  void main()
  {
      struct node n1 = (struct node*)malloc(sizeof(struct node));
  
      int *tab = n1-&gt;date;
      printf("Jour : %d , Mois : %d , Anne : %d",tab[0],tab[1],tab[2]);
  }
  </code></pre>
  
  <p><em>error is : return from incompatible pointer type.</em></p>
  
  <p>ps : i tried return &amp;tab in return of getDate same error</p>
  
  <p>thank you.</p>