Advertisement Jump to content


This topic is now archived and is closed to further replies.


File Database & Data Structure :: C++

This topic is 6175 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi. I have a finite array list of a data structure (some char and integers). I can write to a file with the update of the array list. For example, let say the array list holds an array of five data structures. I can write all contents to a file. While the program can update a file with the latest content, it cannot *read* all data from the file. For example, let say the array list holds five data structures. Let say the array list was full when the program updated the database file. Thus, there are five complete data structures in the database file. When the program reads the database file and copy the data from the file into the same array list, it only reads *the first data structure*. In other words, the program can update the database file with new data structure, but it can only read one data structure from the file at any instances. Here is how I get it to read data from the database file., sizeofdatabasefile); What is the best way to solve this problem? I want to copy all context from the database file into the array list. Last, is this problem related to the fact that the list is an array rather than pointer-base? Thanks, Kuphryn

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!