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();
When I do:
int menu()
{
cin >> select;
return (select);
}
int main()
{
int x = menu;
return 0;
}
I get "invalid conversion from 'int (*)()' to 'int' [-fpermissive]
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?