Can U help me to code for book issue and book deposit. . .
because i have difficulties in this part! plz help me on the project!
and i really need all your help! . .
Can U help me to code for book issue and book deposit. . .
because i have difficulties in this part! plz help me on the project!
and i really need all your help! . .
Last edited by [Student]; 09-26-2011 at 05:58 PM.
50 posts here and you still haven't figured out how to ask a question. Based on just looking through your code I would suggest:
- Stop using char arrays, you should be using std::string
- You no longer need conio.h since you defined your own console functions.
- There is no need for txt files here, just do IO in binary mode and read/write structs directly
- When your program starts, open your "database" and read the whole thing into memory. I would suggest using something like a std::list here. If you are not allowed to use the STL, make your own.
- Conversely when your program is done, write out your list into the file.
- You are asking us to violate the homework policy; we are not going to do that. Come back with a specific question.
Make those changes I suggested above, reformat your code, and then post a specific question on what you need help on. Not just a "Can someone finish my homework for me" question.
Another general piece of advice is not to mix logical components of your applciation. There is no reason why your functions related to GUI should be related to a student. A display function should only know about displaying stuff, not grades and student IDs.
In the following snippet:
You should not use read and write for name of your streams. There are member functions with those names already defined and you may get confused as to which you are dealing with, your stream or the member function.Code:ifstream read("book.txt", ios::in); ifstream read2("book.txt", ios::in); ofstream write("temp.txt");
Jim
ok , but can u help me a little bit, just an example? because i don't know how to start ...
Last edited by [Student]; 09-26-2011 at 05:06 PM.