I need to save variables from a c++ app to a local text file or other file
when I shut down the application. i need the application to recall those
variable values when restarting. This must be easy for veteran programmers,
can someone help me?
--
Rick

Re: variables by msnews

msnews
Wed Jul 27 22:47:32 CDT 2005

This quetion very easy actually, you are save these variables to a INI file
or other file, if you save to a INI file, you can use these function to
recall and save:

WritePrivateProfileString
GetPrivateProfileString
GetPrivateProfileInt

if you save to other file, you can use these function to recall and save:
CreateFile
ReadFile
WriteFile

and so on...


"Excalibur999" <Excalibur999@discussions.microsoft.com> дÈëÓʼþ
news:8CA1B368-0480-4890-969F-BF35C0B7E444@microsoft.com...
> I need to save variables from a c++ app to a local text file or other file
> when I shut down the application. i need the application to recall those
> variable values when restarting. This must be easy for veteran
programmers,
> can someone help me?
> --
> Rick



Re: variables by Excalibur999

Excalibur999
Thu Jul 28 00:21:01 CDT 2005

It sounds very easy...but I was hoping for syntax.

I need to save some char variables and some doubles. I just need to know
what the lines are that i need to write, then retrieve.

writefile(...etc. etc.

thank you, i hope someone will post this answer.




--
Rick


"msnews.microsoft.com" wrote:

> This quetion very easy actually, you are save these variables to a INI file
> or other file, if you save to a INI file, you can use these function to
> recall and save:
>
> WritePrivateProfileString
> GetPrivateProfileString
> GetPrivateProfileInt
>
> if you save to other file, you can use these function to recall and save:
> CreateFile
> ReadFile
> WriteFile
>
> and so on...
>
>
> "Excalibur999" <Excalibur999@discussions.microsoft.com> �´�ë��¼þ
> news:8CA1B368-0480-4890-969F-BF35C0B7E444@microsoft.com...
> > I need to save variables from a c++ app to a local text file or other file
> > when I shut down the application. i need the application to recall those
> > variable values when restarting. This must be easy for veteran
> programmers,
> > can someone help me?
> > --
> > Rick
>
>
>

Re: variables by Mark

Mark
Thu Jul 28 01:15:20 CDT 2005

You design your own. With INI you simply write up a class wrapper that does
things like CStringA format, format.Format("%f", MyFloatArg);

--
- Mark Randall
http://zetech.swehli.com

"Excalibur999" <Excalibur999@discussions.microsoft.com> wrote in message
news:D17F9EB1-C911-4667-98F3-224E50E3DE78@microsoft.com...
> It sounds very easy...but I was hoping for syntax.
>
> I need to save some char variables and some doubles. I just need to know
> what the lines are that i need to write, then retrieve.
>
> writefile(...etc. etc.
>
> thank you, i hope someone will post this answer.
>
>
>
>
> --
> Rick