Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Aid needed with file control

Author
Message
Regnuar
15
Years of Service
User Offline
Joined: 25th Dec 2008
Location:
Posted: 8th Feb 2010 11:52
Could someone give me a very simple example how to write/read inside the file.

So, if there is 2 options in this small program, 1 to make file and 2 to read file. It asks name and age, name works as filename and age is the thing which should be written inside the file.

at the start if we press 2, it asks name to load file we're looking for and then it prints age.

I'v been playing with these commands for a few hours now and when i load the file, it just gives value 1 even the age is 999999999. Hopefully i was clear enough.

I don't give my snippet here cause i wan't to hear different kind of ways to do it.
revenant chaos
Valued Member
17
Years of Service
User Offline
Joined: 21st Mar 2007
Location: Robbinsdale, MN
Posted: 8th Feb 2010 14:50
Is this what you are trying to do?
TDK
Retired Moderator
22
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 9th Feb 2010 23:32
Check out Programming For Beginners Part IV - File Access here:

http://forum.thegamecreators.com/?m=forum_view&t=99497&b=10

TDK

Login to post a reply

Server time is: 2024-11-24 20:48:35
Your offset time is: 2024-11-24 20:48:35