title: How to fix "expected a declaration"?
body: <p>I finished my code for class, but I keep getting an error on the brackets under my functions.I did it in class, and this wasn't a problem. Do you guys know what I am doing wrong? I tried looking, but I can't really find the specific solution to my exact problem.</p>
  
  <pre><code>#include &lt;iostream&gt;
  
  using namespace std;
  
  int getGrades(int[], int);
  
  void calcStats(int[], int, int&amp;, int&amp;, double&amp;);
  int main()
  {
      const int size = 20;
      int grades[size];
  
      int count = getGrades(grades, size);
  
      int highGrade = 0;
      int lowGrade = 100;
      double average = 0;
  
      calcStats(grades, count, highGrade, lowGrade, average);
  
      cout &lt;&lt; "Lowest Grade: " &lt;&lt; lowGrade &lt;&lt; endl;
      cout &lt;&lt; "Highest Grade: " &lt;&lt; highGrade &lt;&lt; endl;
      cout &lt;&lt; "Average Grade: " &lt;&lt; average &lt;&lt; endl;
  
      system("pause");
      return 0;
  }
  
  int getGrades(int Grades[], int size); 
  { // error "expected a declaration"
      int count = 0;
      int grade;
      cout &lt;&lt; "Please enter up to 20 grades followed by a -1 when done." &lt;&lt; endl;
      cin &gt;&gt; grade;
      while (grade != -1)
      {
          grades[count] = grade;
          count++;
  
          if (count == 20) {
              break;
          }
          cin &gt;&gt; grade;
      }
      return count;
  }
  
  
  void calcStats(int grades[], int size,int&amp; highGrade, int&amp; lowGrade, double&amp; average);
  { // error "expected a declaration"
      int total = 0;
      highGrade;
      lowGrade;
  
      for (int i = 0; i &lt; size; i++) {
          total += grades[i];
          if (grades[i] &gt; highGrades) {
              highGrades = grades[i];
          }
          if (grades[i] &lt; lowGrades) {
              lowGrades = grades[i];
          }
      }
      average = static_cast&lt;double&gt;(total) / size;
  }
  </code></pre>