Jump to content

  • Log In with Google      Sign In   
  • Create Account

#ActualGodmil

Posted 17 June 2013 - 10:28 AM

Copy the menu function above the main function. Basically the compiler is starting at the very top of your file... coming down to main, then seeing the call to menu() and going "I have no idea what this function is", if you had the menu function at the top of the page (below the includes and namespace) then the compiler would have already seen the function before it got to it in main, and therefore it would know what it was.

 

bradbobak suggested just writing the line "int menu();" before main(), that would say to the compiler "There is a function called menu, I'm not going to tell you what it does yet, but just know if you see it in main() then all will be explained later on." smile.png

 

Also you may want to correct the spelling of 'calculator()' after (Choice==1) in the menu function.


#1Godmil

Posted 17 June 2013 - 10:26 AM

Copy the menu function above the main function. Basically the compiler is starting at the very top of your file... coming down to main, then seeing the call to menu() and going "I have no idea what this function is", if you had the menu function at the top of the page (below the includes and namespace) then the compiler would have already seen the function before it got to it in main, and therefore it would know what it was.

 

bradbobak suggested just writing the line "int menu(){}" before main(), that would say to the compiler "There is a function called menu, I'm not going to tell you what it does yet, but just know if you see it in main() then all will be explained later on." :)

 

Also you may want to correct the spelling of 'calculator()' after (Choice==1) in the menu function.


PARTNERS