You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
403 B

  1. #include "Error.h"
  2. int error(int errorCode)
  3. {
  4. int returnValue=0;
  5. switch(errorCode){
  6. case -1:
  7. puts("Login not successful.");
  8. returnValue = -1;
  9. break;
  10. case -2:
  11. puts("Maximum number of attempts reached.");
  12. returnValue = -2;
  13. break;
  14. case -3:
  15. puts("No menu entry available for this number.");
  16. returnValue = -3;
  17. break;
  18. default:
  19. puts("Error code unknown.");
  20. }
  21. return returnValue;
  22. }