Browse Source

Implementation of function error()

remotes/origin/feature/error-handling
fdai7057 2 years ago
parent
commit
ecc8068103
  1. 5
      build-project.sh
  2. 23
      src/Error.c
  3. 2
      src/Error.h
  4. 7
      src/main.c
  5. 9
      team.md

5
build-project.sh

@ -1,5 +0,0 @@
clear
cd src/
gcc main.c
./a.out
rm a.out

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);

7
src/main.c

@ -1,7 +0,0 @@
#include <stdio.h>
int main()
{
return 0;
}

9
team.md

@ -1,9 +0,0 @@
# Bankmanagement-System
- Can Hacioglu, Fdlt3817
- Atharva Kishor Naik, fdai7514
- Julius Philipp Engel, fdai7057
- Shivam Chaudhary, fdlt3781
- Mohamed Yahya Dahi, fdai6618
- Haytham Daoula, fdai7207
Loading…
Cancel
Save