When running my program it is not reading anything in for the Student's name when I try to change the information in the database, I've tried several things to trying and alter the readin, but nothing seems to work.
I'm hoping that someone might be able to point me in the right direction.
Below is a snippet of the code I have been working on, and the porting that appears to be failing. Below that is the output that I and receiving. If you notice, it is not letting me input the name for the user.
Code:char temp; int len; found = 1; printf("the value of sema_set=%d\n", sema_set); Wait(sema_set,1); printf("Name: %s\nStudentID: %s\nAddress: %s\n", infoptr->name,infoptr->studentID,infoptr->$ printf("Telephone: %s\n\n", infoptr->telephone); sleep(2); Signal(sema_set,1); //WORKING // sema_set=semget(SEMA_KEY, 0,0); Wait(sema_set,1); printf("Enter the new name for the student.\n"); printf("Name: "); // scanf("%s", temp); // printf("%s", temp); // fgets(temp, 100, stdin); gets("%s", temp);./Load
Database - LOAD
Enter a file to be loaded.
dataFile.txt has been loaded into the database with 11 entries.
Database - CHANGE
Enter the Student ID to modify
Student ID: 111223344
the value of sema_set=-1078661352
Name: Paul S Blair
Address: 3197 Trinity Rd. Lexington, KY 40533
Enter the new name for the student.
Name: Enter the new ID for the student.