Browse Source

solve merge conflict

remotes/origin/feature/customer-login
fdai7057 2 years ago
parent
commit
349f173811
  1. 14
      build-project.sh
  2. 5
      src/CustomerProperties.h
  3. 24
      src/StringManipulation.c
  4. 3
      src/StringManipulation.h
  5. 4
      src/main.c
  6. 6
      team.md

14
build-project.sh

@ -1,14 +0,0 @@
clear
<<<<<<< HEAD
ceedling test:all
cd src/
gcc main.c createCustomer.c -o prog
./prog
rm prog
cd ..
=======
cd src/
gcc main.c
./a.out
rm a.out
>>>>>>> 38af5af (build script)

5
src/CustomerProperties.h

@ -0,0 +1,5 @@
typedef struct Customer{
int ID;
char *forename,*surname,*password;
float balance;
}customer_t;

24
src/StringManipulation.c

@ -0,0 +1,24 @@
#include "StringManipulation.h"
/*Code written by Julius Philipp Engel, fdai7057*/
char *to_string(int number)
{
if(number==0)
{
return "0\0";
}
else
{
int cpy = number, len = 0;
while(number>0){
++len;
number /= 10;
}
char *str = calloc(len+1, sizeof(char));
for(int i=0,j=len-1;i<len;++i,--j){
*(str+j) = '0' + (cpy % 10);
cpy /= 10;
}
*(str+len) = '\0';
return str;
}
}

3
src/StringManipulation.h

@ -0,0 +1,3 @@
#include <stdlib.h>
#include <stdio.h>
char *to_string(int);

4
src/main.c

@ -1,4 +0,0 @@
#include "createCustomer.h"
int main(){
collectCustomerProperties();
}

6
team.md

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