title: How do I make a variable equal the number returned by a function?
body: <p>I'm new to functions and I can't seem to figure out how to make a variable in a function return as a variable in main();</p>
  
  <p>When I do:</p>
  
  <pre><code>int menu()
  {
  cin &gt;&gt; select;
  return (select);
  }
  
  int main()
  {
  int x = menu;
  return 0;
  }
  </code></pre>
  
  <p>I get "invalid conversion from 'int (*)()' to 'int' [-fpermissive]</p>
  
  <p>This code has also been very simplified but that's the idea, how do I get this variable to equal the value that my function has returned?</p>