Record Detail

Compile Error

/in/hotel-mt.c: In function 'card':
/in/hotel-mt.c:5:24: error: 'cust1' undeclared (first use in this function)
     printf("name:%s/n",cust1.name);
                        ^~~~~
/in/hotel-mt.c:5:24: note: each undeclared identifier is reported only once for each function it appears in
/in/hotel-mt.c: In function 'receipt':
/in/hotel-mt.c:15:26: error: 'cust1' undeclared (first use in this function)
     printf("nights:%d/n",cust1.nights);
                          ^~~~~
/in/hotel-mt.c: In function 'increase':
/in/hotel-mt.c:23:5: error: 'cust1' undeclared (first use in this function)
     cust1.night=cust1.night+m;
     ^~~~~
/in/hotel-mt.c: In function 'increasebre':
/in/hotel-mt.c:28:5: error: 'cust1' undeclared (first use in this function)
     cust1.breakfast=cust1.breakfast+m;
     ^~~~~
/in/hotel-mt.c: In function 'decreasebre':
/in/hotel-mt.c:34:5: error: 'cust1' undeclared (first use in this function)
     cust1.breakfast=cust1.breakfast+-m;
     ^~~~~
/in/hotel-mt.c: In function 'room':
/in/hotel-mt.c:40:8: error: 'cust1' undeclared (first use in this function)
     if(cust1.type=room){
        ^~~~~
/in/hotel-mt.c: In function 'receivemoney':
/in/hotel-mt.c:49:11: error: 'cust1' undeclared (first use in this function)
     money=cust1.money+cust2.money+cust3.money;
           ^~~~~
/in/hotel-mt.c:49:23: error: 'cust2' undeclared (first use in this function)
     money=cust1.money+cust2.money+cust3.money;
                       ^~~~~
/in/hotel-mt.c:49:35: error: 'cust3' undeclared (first use in this function)
     money=cust1.money+cust2.money+cust3.money;
                                   ^~~~~
/in/hotel-mt.c: In function 'card':
/in/hotel-mt.c:11:1: error: control reaches end of non-void function [-Werror=return-type]
 }//taking care of customers checking-in
 ^
/in/hotel-mt.c: In function 'receipt':
/in/hotel-mt.c:20:1: error: control reaches end of non-void function [-Werror=return-type]
 }//taking care of customers checking-out
 ^
/in/hotel-mt.c: In function 'increase':
/in/hotel-mt.c:25:1: error: control reaches end of non-void function [-Werror=return-type]
 }//increase the nights
 ^
/in/hotel-mt.c: In function 'increasebre':
/in/hotel-mt.c:30:1: error: control reaches end of non-void function [-Werror=return-type]
 }//increase the breakfast
 ^
/in/hotel-mt.c: In function 'decreasebre':
/in/hotel-mt.c:36:1: error: control reaches end of non-void function [-Werror=return-type]
 }//decrease the breakfast
 ^
/in/hotel-mt.c: In function 'room':
/in/hotel-mt.c:45:1: error: control reaches end of non-void function [-Werror=return-type]
 }//given a type of room returns the list of available rooms and their number
 ^
/in/hotel-mt.c: In function 'receivemoney':
/in/hotel-mt.c:51:1: error: control reaches end of non-void function [-Werror=return-type]
 }
 ^
cc1: all warnings being treated as errors
/in/hotel-db.c: In function 'main':
/in/hotel-db.c:23:31: error: passing argument 1 of 'strlen' from incompatible pointer type [-Werror=incompatible-pointer-types]
             int length=strlen(strchr);
                               ^~~~~~
In file included from /in/hotel-db.c:2:0:
/usr/include/string.h:394:15: note: expected 'const char *' but argument is of type 'char * (*)(const char *, int)'
 extern size_t strlen (const char *__s)
               ^~~~~~
/in/hotel-db.c:24:18: error: variable 'b' set but not used [-Werror=unused-but-set-variable]
             char b[100];
                  ^
/in/hotel-db.c:23:17: error: unused variable 'length' [-Werror=unused-variable]
             int length=strlen(strchr);
                 ^~~~~~
/in/hotel-db.c:37:15: error: implicit declaration of function 'delete' [-Werror=implicit-function-declaration]
             a=delete(sent,p);
               ^~~~~~
/in/hotel-db.c:39:14: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
             c=strchr(p,'#');
              ^
/in/hotel-db.c:35:24: error: variable 'd' set but not used [-Werror=unused-but-set-variable]
             char a,b,c,d;
                        ^
/in/hotel-db.c:35:18: error: variable 'a' set but not used [-Werror=unused-but-set-variable]
             char a,b,c,d;
                  ^
/in/hotel-db.c: At top level:
/in/hotel-db.c:68:6: error: conflicting types for 'delete'
 char delete(char *s1,char *s2){
      ^~~~~~
/in/hotel-db.c:37:15: note: previous implicit declaration of 'delete' was here
             a=delete(sent,p);
               ^~~~~~
/in/hotel-db.c: In function 'delete':
/in/hotel-db.c:79:1: error: control reaches end of non-void function [-Werror=return-type]
 }//delete s2 in s1
 ^
cc1: all warnings being treated as errors

Information

Submit By
Type
Submission
Homework
Project 2
Language
C
Submit At
2018-07-10 09:43:48
Judged At
2018-07-10 09:43:48
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes