Please guys can you read this code and give your comments? It's for a Library Cataloging System Program that use Encryption and Decryption
Code:#include <stdio.h> // The Maximum Length of BookName is 100 Characters #define MAXL_BOOKNAME 100 // The Maximum Length of BookAuthor is 50 Characters #define MAXL_BOOKAUTHOR 50 // The Maximum Length of DATE is 20 Characters #define MAXL_DATE // Defining a struct (Mostly Quoted from Hammer) typedef struct BookRecord { int Book_Id; char Book_Name[MAXL_BOOKNAME]; char Book_Author[MAXL_BOOKAUTHOR]; char Book_PublishingDate[MAXL_DATE]; /* we can use "time_t Book_PublishingDate; */ // return true if the Book is borrowed Is it correct? bool Book_Borrowed; } BookRecord_t; // Why using _t ? void main() { int val; printf("What Do you Want to do: "); printf("\n1. Encrypt The File."); printf("\n2. Decrypt The file."); printf("\n3. Add a new Book."); printf("\n4. Remove an Existing Book."); printf("\n5. Update an Existing Book."); printf("\n6. Exit Program.\n"); scanf("%d", &value); switch val { case 1: // What functions to include here? break; case 2: // What functions to include here? case 3: AddRecord() // What parameters to include? case 4: RemoveRecord(RecordNum) // I'm not sure about the parameters case 5: UpdateRecord(RecordNum) // also i'm not .... case 6: exit(); }



LinkBack URL
About LinkBacks


