Hi, I want a very simple code. If anyone can write it for me? Actually I don't know any knowlege of FILE I/O in C++. I know the algorithm but can't write code. Please write it using just <iostream> and <fstream> classes, using the whole std namespace i.e. ( using namespace std; ) instead of writing (std::cout etc) again and again, and also without using any pre-defined function. I shall be thankful to you guys...
I will give you a guideline. 1. See How to use Random Access Files in C++ and understand File Access in C++ 2. Define a structure as below. typedef struct abc_{ int ID; char student_name[50]; int age; ...... ...... } Code (markup): 3. When you need to write a new record, Fill out one instance of this structure with data seek to end of file Save it to file 4. Reading a record Seek to beginning of file on a while loop, read to data to an instance of the structure check whether the ID matches exit if match, continue on loop until end of file I think you have everything now to start with.
The request you posted = assignment requirements. (I did go to college for programing, i know what an assignment looks like)
If it's not a homework, why does the first thread speaks the language of an assignment from your teacher ?
If you are willing to negotiate a reasonable fee for this, you may state that, so a freelancer may contact you.
lol...a friends asked me to do that...it was his assignment ... we didn't have studied the FILE I/O at that time...so asked...