title: void' should be preceded by ';' error?
body: <p>So I'm using Visual studio C++. My current program was so create an array in reverse...but I'm getting the error of "void' should be preceded by ';'". Help would be appreciated. </p>
  
  <pre><code>#include &lt;iostream&gt;
  
  using namespace std;
  
  int main()
  
  //this function outputs the array in reverse
  void reverse(double* a, int size)
  {
  
  for(int i = size-1; i &gt;= 0; --i)//either i=size or i=size-1
  {
  cout &lt;&lt; a[i] &lt;&lt; ' ';
  }
  }
  </code></pre>