title: Recall main function with arguments
body: <pre><code>#include &lt;string.h&gt;
  #include &lt;stdio.h&gt;
  #include &lt;windows.h&gt;
  #include &lt;wchar.h&gt;
  #include &lt;unistd.h&gt;
  #define sleep(x) Sleep(1000 * x)
  
  int checkTime();
  
  int main ( int argc, char *argv[] ) { 
  
      char *getFirstArgument = argv[1];
      char *getSecondArgument = argv[2];
      char getCheckTime;
  
      checkTime(&amp;getCheckTime);
  
      if(*getFirstArgument != getCheckTime) {
          sleep(1);
          main(*getFirstArgument);
      } else if(*getFirstArgument == getCheckTime &amp;&amp; *getSecondArgument == 'r') {
          system("shutdown /r");
      } else if(*getFirstArgument == getCheckTime) {
          system("shutdown /s"); 
      }
  
      return 0;
  
  }
  
  int checkTime() {
  
      char getConvertedTime[5] = {};
  
      SYSTEMTIME localTime;
      GetLocalTime ( &amp;localTime );
  
      sprintf( getConvertedTime, "%d:%d", localTime.wHour, localTime.wMinute );
      printf( "%s\n", getConvertedTime );
  
      return 0;
  
  } 
  </code></pre>
  
  <p>Hi! I don't know what arguments I need to put when I recall main function, and I really can't find the answer, I know it's exist somewhere. :) And here is the error what show me the MinGW compiler.</p>
  
  <pre><code>$ gcc -Wall test.c -o test.exe 
  test.c: in function 'main':
  test.c:20:3: error: to few arguments to function 'main'
  test.c:10:5: note: declared here
  </code></pre>
  
  <p>Sorry for my bad english! Thank you! </p>