Click here to Skip to main content
15,215,190 members
Rate this:
Please Sign up or sign in to vote.
See more:
how can i code this from database.txt
•read the file.
•extract the relevant data (that is parse its content).
•modify the data.
•write back the modified data to the file.

need help
Posted
Updated 20-Oct-13 21:37pm
v2
Rate this:
Please Sign up or sign in to vote.

Solution 1

  • read the file.
  • extract the relevant data (that is parse its content).
  • modify the data.
  • write back the modified data to the file.
   
Comments
Member 10334475 21-Oct-13 0:03am
   
how do I go about coding that?
im new to it
nv3 21-Oct-13 6:54am
   
Right answer!
Rate this:
Please Sign up or sign in to vote.

Solution 2

Start with ReadFile[^]. As to the rest you will really have to try think about the content of the records you are reading, and how they can be updated, no one can write the code for you.
   
Rate this:
Please Sign up or sign in to vote.

Solution 3

First, you cannot expect others to code for you. You should try to do what you want yourself, and if you have any specific technical problem, please post them here.

You'll need to learn the following things:

First learn about handling file I/O in C++ : http://www.cplusplus.com/doc/tutorial/files/[^]

Your database.txt file may probably have a scheme like XML or JSON. To parse JSON or XML they are plenty of open source C++ libraries (To find them google will help you).
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100