Record Detail

Compile Error

/in/hotel-main.c: In function 'initialize':
/in/hotel-main.c:122:19: error: incompatible type for argument 1 of 'printroomlist'
     printroomlist(*head);
                   ^
/in/hotel-main.c:30:6: note: expected 'Room * {aka struct _Room *}' but argument is of type 'Room {aka struct _Room}'
 void printroomlist(Room *head);
      ^~~~~~~~~~~~~
/in/hotel-main.c: In function 'printdorm':
/in/hotel-main.c:167:31: error: format '%d' expects argument of type 'int', but argument 3 has type 'char *' [-Werror=format=]
     fprintf(fp,"room number: %d\n",temp->roomname);
                               ^
/in/hotel-main.c:170:40: error: format '%d' expects argument of type 'int', but argument 3 has type 'char *' [-Werror=format=]
         fprintf(fp,"id of the visitor %d: %s\n",ctemp->id);
                                        ^
/in/hotel-main.c:170:44: error: format '%s' expects a matching 'char *' argument [-Werror=format=]
         fprintf(fp,"id of the visitor %d: %s\n",ctemp->id);
                                            ^
/in/hotel-main.c: In function 'printfamily':
/in/hotel-main.c:187:31: error: format '%d' expects argument of type 'int', but argument 3 has type 'char *' [-Werror=format=]
     fprintf(fp,"room number: %d\n",temp->roomname);
                               ^
/in/hotel-main.c:190:40: error: format '%d' expects argument of type 'int', but argument 3 has type 'char *' [-Werror=format=]
         fprintf(fp,"id of the visitor %d: %s\n",ctemp->id);
                                        ^
/in/hotel-main.c:190:44: error: format '%s' expects a matching 'char *' argument [-Werror=format=]
         fprintf(fp,"id of the visitor %d: %s\n",ctemp->id);
                                            ^
/in/hotel-main.c: In function 'printdouble':
/in/hotel-main.c:207:31: error: format '%d' expects argument of type 'int', but argument 3 has type 'char *' [-Werror=format=]
     fprintf(fp,"room number: %d\n",temp->roomname);
                               ^
/in/hotel-main.c:210:40: error: format '%d' expects argument of type 'int', but argument 3 has type 'char *' [-Werror=format=]
         fprintf(fp,"id of the visitor %d: %s\n",ctemp->id);
                                        ^
/in/hotel-main.c:210:44: error: format '%s' expects a matching 'char *' argument [-Werror=format=]
         fprintf(fp,"id of the visitor %d: %s\n",ctemp->id);
                                            ^
/in/hotel-main.c: In function 'printsingle':
/in/hotel-main.c:227:31: error: format '%d' expects argument of type 'int', but argument 3 has type 'char *' [-Werror=format=]
     fprintf(fp,"room number: %d\n",temp->roomname);
                               ^
/in/hotel-main.c:230:40: error: format '%d' expects argument of type 'int', but argument 3 has type 'char *' [-Werror=format=]
         fprintf(fp,"id of the visitor %d: %s\n",ctemp->id);
                                        ^
/in/hotel-main.c:230:44: error: format '%s' expects a matching 'char *' argument [-Werror=format=]
         fprintf(fp,"id of the visitor %d: %s\n",ctemp->id);
                                            ^
/in/hotel-main.c: In function 'custNameArrival':
/in/hotel-main.c:260:21: error: too many arguments for format [-Werror=format-extra-args]
        sscanf(ptemp,"c",&temp);
                     ^~~
/in/hotel-main.c: In function 'checkin':
/in/hotel-main.c:388:18: error: assignment from incompatible pointer type [-Werror=incompatible-pointer-types]
             Ctemp=searchroom(head);
                  ^
/in/hotel-main.c:390:21: error: format '%s' expects argument of type 'char *', but argument 2 has type 'char (*)[20]' [-Werror=format=]
             scanf("%s",&Ctemp->name);
                     ^
/in/hotel-main.c:392:21: error: format '%s' expects argument of type 'char *', but argument 2 has type 'char (*)[30]' [-Werror=format=]
             scanf("%s",&Ctemp->id);
                     ^
/in/hotel-main.c:401:23: error: incompatible type for argument 1 of 'printdorm'
             printdorm(*Ctemp);
                       ^
/in/hotel-main.c:160:6: note: expected 'Room * {aka struct _Room *}' but argument is of type 'customer {aka struct _customer}'
 void printdorm(Room *temp){
      ^~~~~~~~~
/in/hotel-main.c:405:18: error: assignment from incompatible pointer type [-Werror=incompatible-pointer-types]
             Ctemp=searchroom(head);
                  ^
/in/hotel-main.c:407:21: error: format '%s' expects argument of type 'char *', but argument 2 has type 'int *' [-Werror=format=]
             scanf("%s",&CustNum);
                     ^
/in/hotel-main.c:412:13: error: statement with no effect [-Werror=unused-value]
             for (i;i<CustNum;i++){
             ^~~
/in/hotel-main.c:414:25: error: format '%s' expects argument of type 'char *', but argument 2 has type 'char (*)[20]' [-Werror=format=]
                 scanf("%s",&Ctemp->name);
                         ^
/in/hotel-main.c:416:25: error: format '%s' expects argument of type 'char *', but argument 2 has type 'char (*)[30]' [-Werror=format=]
                 scanf("%s",&Ctemp->id);
                         ^
/in/hotel-main.c:424:31: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
                 Ctemp->Rnumber=Rtemp->roomname;
                               ^
/in/hotel-main.c:426:29: error: incompatible type for argument 1 of 'printfamily'
                 printfamily(*Ctemp);}
                             ^
/in/hotel-main.c:180:6: note: expected 'Room * {aka struct _Room *}' but argument is of type 'customer {aka struct _customer}'
 void printfamily(Room *temp){
      ^~~~~~~~~~~
/in/hotel-main.c:429:22: error: assignment from incompatible pointer type [-Werror=incompatible-pointer-types]
                 Ctemp=searchroom(head);
                      ^
/in/hotel-main.c:431:25: error: format '%s' expects argument of type 'char *', but argument 2 has type 'int *' [-Werror=format=]
                 scanf("%s",&CustNum);
                         ^
/in/hotel-main.c:436:29: error: format '%s' expects argument of type 'char *', but argument 2 has type 'char (*)[20]' [-Werror=format=]
                     scanf("%s",&Ctemp->name);
                             ^
/in/hotel-main.c:438:29: error: format '%s' expects argument of type 'char *', but argument 2 has type 'char (*)[30]' [-Werror=format=]
                     scanf("%s",&Ctemp->id);
                             ^
/in/hotel-main.c:446:35: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
                     Ctemp->Rnumber=Rtemp->roomname;
                                   ^
/in/hotel-main.c:448:33: error: incompatible type for argument 1 of 'printdouble'
                     printdouble(*Ctemp);
                                 ^
/in/hotel-main.c:200:6: note: expected 'Room * {aka struct _Room *}' but argument is of type 'customer {aka struct _customer}'
 void printdouble(Room *temp){
      ^~~~~~~~~~~
/in/hotel-main.c:451:30: error: assignment from incompatible pointer type [-Werror=incompatible-pointer-types]
                         Ctemp=searchroom(head);
                              ^
/in/hotel-main.c:453:34: error: format '%s' expects argument of type 'char *', but argument 2 has type 'char (*)[20]' [-Werror=format=]
                          scanf("%s",&Ctemp->name);
                                  ^
/in/hotel-main.c:455:34: error: format '%s' expects argument of type 'char *', but argument 2 has type 'char (*)[30]' [-Werror=format=]
                          scanf("%s",&Ctemp->id);
                                  ^
/in/hotel-main.c:464:38: error: incompatible type for argument 1 of 'printsingle'
                          printsingle(*Ctemp);;
                                      ^
/in/hotel-main.c:220:6: note: expected 'Room * {aka struct _Room *}' but argument is of type 'customer {aka struct _customer}'
 void printsingle(Room *temp){
      ^~~~~~~~~~~
/in/hotel-main.c: In function 'removebreakfast':
/in/hotel-main.c:488:14: error: variable 'rm' set but not used [-Werror=unused-but-set-variable]
     customer rm=sCustNode(rnode,"breakfast",10);
              ^~
/in/hotel-main.

Information

Submit By
Type
Submission
Homework
Project 2
Language
C
Submit At
2018-07-17 13:04:39
Judged At
2018-07-17 13:04:39
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes