Share
Explore BrainMass

Saving database records to an external file

Create and prepare a disk file for records containing the structure used in attached file.

Store the account records in the file using the same hashing/rehashing technique used for storing them in an array of structures.

* i just need help storing accounts to a file instead of a structure using standard c ex: fopen fclose,

feel free 2 ask any questions

Attachments

Solution Preview

Ok, from the sound of it, you have everything pretty much done, you're just having problems figuring out how to save the data to an external file. If I've understood the gist of it correctly, the following should help.

First, you already have your textbook definitions of fopen, fclose, etc... so I won't rehash that information. Instead, I will direct you to some websites that give examples of using those functions in code. By the way, I use the word function to mean structure. It's the way I learned C++. Hopefully I won't confuse you.

Visit http://www.decompile.com/cpp/faq/fopen_write_append.htm and review the examples Mr. Krauskopf gives using fopen. Notice that he gives two examples. One example makes many calls ...

Solution Summary

How do I create database records and save them to an external file? This was the question answered by the OTA. The OTA references some possibilities and lists some available websites as references for different techniques one may use to accomplish a solution to this question. Some familiarity with programming in C is assumed.

$2.19