פורסם 2007 באוקטובר 418 שנים למה זה מדלג לי על השורה שמסומנת בכוכביות? printf("Insert name: "); gets(TmpCell->Name); printf("Insert adress: "); gets(TmpCell->Adress); printf("Insert ID: "); scanf("%lu",&TmpCell->ID); printf("Insert age: "); scanf("%lu",&TmpCell->Age); printf("Insert gender: "); gets(TmpCell->Gender); //********************** printf("Insert faculty: "); gets(TmpCell->Faculty); printf("Insert status: "); gets(TmpCell->Status); printf("Insert year: "); scanf("%lu",&TmpCell->Year); printf("Insert grades average: "); scanf("%lu",&TmpCell->GradesAvg); printf("Insert credit points: "); scanf("%lu",&TmpCell->CreditPoints);
פורסם 2007 באוקטובר 418 שנים מחבר הקוד המלא ארוך .אולי אם אני יצרף את הפלט תבין את הכוונה מדלג:(הפלט מצורף בקובץ)[attachment deleted by admin]
פורסם 2007 באוקטובר 518 שנים מחבר למה אני מקבל את השגיאה הזאת על השורה שמסומנת בכוכביות?c:\users\יעקובי אורן\desktop\project\menus.h(27) : warning C4047: 'function' : 'SPosition' differs in levels of indirection from 'int'קטעי הקוד הרלוונטים: SList SL=MakeEmptyStudentsList(NULL); CList CL=MakeEmptyCoursesList(NULL); switch(x) { case '1': do { InsertStudent(SL); //*************** printf("\nInsert another student?(Y/N)\n\n"); }while((c=getch())!='N'&&(c=getch())!='n'); break;typedef struct student *PtrToStudent;typedef PtrToStudent SList;typedef PtrToStudent SPosition;void InsertStudent(SPosition P){ SPosition TmpCell; TmpCell = (SPosition) malloc(sizeof(struct student)); // casting if (TmpCell == NULL) { perror("Out of Space!"); exit(1); } printf("Insert name: "); fflush(stdin); gets(TmpCell->Name); printf("Insert adress: "); fflush(stdin); gets(TmpCell->Adress); printf("Insert ID: "); scanf("%lu",&TmpCell->ID); printf("Insert age: "); scanf("%lu",&TmpCell->Age); printf("Insert gender: "); fflush(stdin); gets(TmpCell->Gender); printf("Insert faculty: "); fflush(stdin); gets(TmpCell->Faculty); printf("Insert status: "); fflush(stdin); gets(TmpCell->Status); printf("Insert year: "); scanf("%lu",&TmpCell->Year); printf("Insert grades average: "); scanf("%lu",&TmpCell->GradesAvg); printf("Insert credit points: "); scanf("%lu",&TmpCell->CreditPoints); TmpCell->Next = P-> Next; P->Next = TmpCell;}struct student{ char Name[LEN]; unsigned long ID; unsigned Age; char Adress[LEN]; char Gender[LEN]; char Faculty[LEN]; char Status[LEN]; unsigned Year; unsigned GradesAvg; unsigned CreditPoints; SPosition Next; };
ארכיון
דיון זה הועבר לארכיון ולא ניתן להוסיף בו תגובות חדשות.