Click here to Skip to main content
15,868,016 members
Please Sign up or sign in to vote.
1.00/5 (1 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

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).
 
Share this answer
 
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.
 
Share this answer
 
  • read the file.
  • extract the relevant data (that is parse its content).
  • modify the data.
  • write back the modified data to the file.
 
Share this answer
 
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!

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900