title: getting the error: expected identifier or ‘(’ before ‘{’ token
body: <p>Getting this error : <code>expected identifier or ‘(’ before ‘{’ token</code> on the first bracket after the <code>#include</code> before the <code>int main</code>. No clue why! Doing an assignment for an introductory programming course. It's due today so any help would be appreciated! </p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
  #include &lt;time.h&gt;
  {
  int main(void);
  
  int cardNum(int firstCard, int secondCard; 
  int highLow;
  int score;
  
  score = 0;   
  srand(time(NULL));
  
      printf("The current card is a %d\n" ,firstCard(2,14));
      printf("\n Will the next card be higher(1) or lower(2)? (press 0 to quit)");
      scanf("%d" ,highLow);
  if cardNum &gt; 1 &amp;&amp; cardNum &lt; 11
  {        
       printf ("The card is: %d ,secondCard.");
  }        
  else if cardNum == 11
  {
  if highLow == 1, &amp;&amp; secondCard &gt; firstCard OR highLow == 2, &amp;&amp; secondCard &lt; firstCard
      {   
          score = score + 1; 
          printf ("\n You have guessed correctly.");
          printf ("\n Your current score is %d ,score!\n");
          printf("The current card is a ("%d" ,cardOne). \n Will the next card be           higher(1) or lower(2)? (press 0 to quit)");
      }    
  else if highLow == 1, &amp;&amp; secondCard &lt; firstCard OR highLow == 2, &amp;&amp; secondCard &gt; firstCard  
      {
          score = score - 1;
          printf ("The card is: %d ,secondCard.");
          printf ("\n You have guessed incorrectly.");
          printf ("\n Your current score is %d ,score!\n");
          printf ("The current card is a %d ,cardOne."); 
          printf ("\n Will the next card be higher(1) or lower(2)? (press 0 to quit)");
      }
  else if secondCard == firstCard
      {
          printf ("\n Matching cards, no change in score");
      }
  else if highLow == 0
      {
          printf ("\n Thanks for playing! Your final score is %d, score.");
      }
  else
      {
          printf ("\n Incorrect input. Please enter 0, 1 or 2")       
      }
  }    
  return(0);
  }
  </code></pre>
  
  <p>I initially had it like that with int main(void){ but then I was getting all these errors instead so I changed it to the semicolon and only got that one error.<br>
  a3.c: In function ‘main’:
  a3.c:24:5: error: expected declaration specifiers or ‘...’ before ‘score’
  a3.c:25:5: error: expected declaration specifiers or ‘...’ before ‘srand’
  a3.c:27:5: error: expected declaration specifiers or ‘...’ before ‘printf’
  a3.c:28:5: error: expected declaration specifiers or ‘...’ before ‘printf’
  a3.c:29:5: error: expected declaration specifiers or ‘...’ before ‘scanf’
  a3.c:31:5: error: expected declaration specifiers or ‘...’ before ‘if’
  a3.c:82:1: error: expected declaration specifiers or ‘...’ before ‘}’ token
  a3.c:82:1: error: expected ‘;’, ‘,’ or ‘)’ before ‘}’ token
  a3.c:82:1: error: expected declaration or statement at end of input
  a3.c:82:1: warning: control reaches end of non-void function [-Wreturn-type]</p>