🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: att.lang.c++
Article #135

Re: load and save variable

#135
From: Bart and Debbie Crane
Date: Mon, 06 Sep 1999 00:00
25 lines
1173 bytes
If you can read standard input, then sscanf is the easiest for C.  If
it's C++, then if it is Windows, then you might want to be reading and
writing the Registry, or some .ini file?  In which case you should use
the Win32 API.

Hakan Venderlof wrote:

> Hello
> I would like to load an variable from a file
> variable.txt looking like this:
>
> 25
>
> and then change the variable in a program and
> save the variable to the samefile, eg overwriting the file
> to for example
>
> 50
>
> How should this be written?
>
> I use Borland c++ 5.02.
>
> --
> ***  greetings         grok        sweden  ***
Technical Details
Message-ID: <37D38281.2EAF6797@qwestinternet.net>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <MppA3.110$ys9.135454720@newsa.telia.net>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10d4ba,d32a38371b4f4347
X-Google-Attributes: gid10d4ba,public
From: Bart and Debbie Crane <bart@qwestinternet.net>
Subject: Re: load and save variable
Date: 1999/09/06
Message-ID: <37D38281.2EAF6797@qwestinternet.net>
X-Deja-AN: 521602107
Content-Transfer-Encoding: 7bit
References: <MppA3.110$ys9.135454720@newsa.telia.net>
X-Accept-Language: en
Content-Type: text/plain; charset=us-ascii
Organization: Concentric Internet Services
Mime-Version: 1.0
Newsgroups: att.lang.c++