Browse Source

Implementation of function error().

remotes/origin/beta
fdai7057 2 years ago
committed by fdai7207
parent
commit
ce3db91d57
  1. 23
      src/Error.c
  2. 2
      src/Error.h

23
src/Error.c

@ -0,0 +1,23 @@
#include "Error.h"
int error(int errorCode)
{
int returnValue=0;
switch(errorCode){
case -1:
puts("Login not successful.");
returnValue = -1;
break;
case -2:
puts("Maximum number of attempts reached.");
returnValue = -2;
break;
case -3:
puts("No menu entry available for this number.");
returnValue = -3;
break;
default:
puts("Error code unknown.");
}
return returnValue;
}

2
src/Error.h

@ -0,0 +1,2 @@
#include <stdio.h>
int error(int);
Loading…
Cancel
Save