title: What does this mean: a function-definition is not allowed here before '{' token
body: <p>My problem is at in the C++ lines below, but I just can't figure it out.</p>
  
  <blockquote>
    <p>[Error] a function-definition is not allowed here before '{' token</p>
  </blockquote>
  
  <pre><code>#include &lt;cstdlib&gt;
  #include &lt;iostream&gt;
  #include&lt;iomanip&gt;
  #include&lt;fstream&gt;
  #include&lt;cstring&gt;
  using namespace std;
  
  int main() {
      void displaymenu(){
          cout&lt;&lt;"MENU"&lt;&lt;"\n";
      }
      displaymenu();
      system("pause");
      return 0;
  }
  </code></pre>