
-----------------------------------
kanye_west_owns
Tue May 11, 2004 4:39 pm

simple database help
-----------------------------------
how can i make a simple database, by just asking a question the user inputs it, and then it saves it to the same file, so the user can actually come back and the information will still be there even if the program was restarted... i need lots of help :D

-----------------------------------
Tony
Tue May 11, 2004 4:59 pm


-----------------------------------
well if you simply want to write down some values to use later on...  simple [url=http://www.compsci.ca/v2/viewtopic.php?t=5]file i/o will do fine. It gets a bit more complicated if you want to write down records :?

-----------------------------------
kanye_west_owns
Tue May 11, 2004 5:29 pm


-----------------------------------
but if i do it this way, itll delete everything in my file, i want it to be in the same file, and to run along side the other codes.

-----------------------------------
Tony
Tue May 11, 2004 5:37 pm


-----------------------------------
:? 
not if you skip to the end of the file :think:

        var streamnumber : int
        open : streamnumber, "myfile", put, mod, seek
        seek : streamnumber, *
        put : streamnumber, "This appears at the end of the file"


-----------------------------------
kanye_west_owns
Tue May 11, 2004 6:47 pm


-----------------------------------
GOD DAMN, its too hard to do this... :twisted:  :evil:  :oops:  :cry:

-----------------------------------
TheFerret
Tue May 11, 2004 9:57 pm


-----------------------------------
You could try reading the file at teh beginning and put the data into an array and read the stuff from there...

P.S. There is harder things to do in Turing, such as making a 3-D Triangle spin that has coloured faces...
