If it doesn't compile, then VS will be reporting error messages to tell you exactly why it's not compiling, including line numbers to show you which lines the errors are on.
Lines 6 and 7 are proto types for two functions, but you only define and use "menu". You are saying that you want a function "displaymax", but you never define this function.
just before the return 0;" in main put these two lines:
1 2
std::cin.ignore(std::numeric_limits<std::streamsize>::max(), '\n'); // Include "limits" header file.
std::cin.ignore(std::numeric_limits<std::streamsize>::max(), '\n');
The first line will clear the input buffer of the "\n". And the second will pause the screen waiting for enter to continue. Otherwise the program ends before you can read the screen output.