iraq boy
20-05-2008, 07:11 PM
السلام عليكم
عندي برنامج واريد المساعدة في بعض النقاط
البرنامج هو:
Write a program that will store the following data about the books you might have
purchased this academic year.
a. Title
b. Publisher
c. Year
d. Edition
e. Author’s name (assume one author)
f. ISBN number.
g. Lent out or not?
You can use either an array of structs or a linked list of structs . Use a text file that has the required data per book on one
line.
Then add the following functionality:
A- Write a function to read in the data from a file (book_list in table below) on
hard-disk and sets the correct data in the data structure you built.
B- Write a function that adds a new entry such that you can add a new book once
you buy it. Mention any problems u face in this step.
C- Write a function or more to search the info you entered. For example a user
wants to find out the ISBN number of a specific book. Or check if a book
already exists or lent out or not.
Note: You will need to use the toupper() to make the string comparisons easier
المشاكل الي عندي هية التي باللون الاحمر وسوف اسردها الان بالتفصيل
اولا بالنسبة لاخذ البيانات من ملف المشكلة تكمن في ان الtitle و ال publisher كل واحد منهم يحتوي على فواصل لذلك لا استطيع اخذه لمتغير واحد و هذه مشكلة كبيرة بحيث انني لا استطيع اخذ البيانات بالشكل الصحيح فمثلا واحد من الكتب اسمه Introduction to C++ Programming لذلك فليس من الممكن قراءة هذا الاسم من الملف تحت سقف متغير واحد
المشكلة الاخرى هيه عندما اقوم بادخال كتاب جديد سوف احتاج ال dynamic array فكيف يمكنني عمل هذا .
ارجو من كل من لديه معلومة فلا يبخل بها ابدااا :sadwavey::sadwavey:
عندي برنامج واريد المساعدة في بعض النقاط
البرنامج هو:
Write a program that will store the following data about the books you might have
purchased this academic year.
a. Title
b. Publisher
c. Year
d. Edition
e. Author’s name (assume one author)
f. ISBN number.
g. Lent out or not?
You can use either an array of structs or a linked list of structs . Use a text file that has the required data per book on one
line.
Then add the following functionality:
A- Write a function to read in the data from a file (book_list in table below) on
hard-disk and sets the correct data in the data structure you built.
B- Write a function that adds a new entry such that you can add a new book once
you buy it. Mention any problems u face in this step.
C- Write a function or more to search the info you entered. For example a user
wants to find out the ISBN number of a specific book. Or check if a book
already exists or lent out or not.
Note: You will need to use the toupper() to make the string comparisons easier
المشاكل الي عندي هية التي باللون الاحمر وسوف اسردها الان بالتفصيل
اولا بالنسبة لاخذ البيانات من ملف المشكلة تكمن في ان الtitle و ال publisher كل واحد منهم يحتوي على فواصل لذلك لا استطيع اخذه لمتغير واحد و هذه مشكلة كبيرة بحيث انني لا استطيع اخذ البيانات بالشكل الصحيح فمثلا واحد من الكتب اسمه Introduction to C++ Programming لذلك فليس من الممكن قراءة هذا الاسم من الملف تحت سقف متغير واحد
المشكلة الاخرى هيه عندما اقوم بادخال كتاب جديد سوف احتاج ال dynamic array فكيف يمكنني عمل هذا .
ارجو من كل من لديه معلومة فلا يبخل بها ابدااا :sadwavey::sadwavey: