0

Hi guys, I'm makeing a Homework "tracker", which is basically a day planner. I need help making a settings file for the initial setup. I have a text box, a couple radio buttons, and one "begin" button. I need a way for the program to remember what choices were seleced. Prefereably a way to put a text file in the programs' root folder. Any help would be great.
Thanks in advance,
TSims11

3
Contributors
6
Replies
7
Views
6 Years
Discussion Span
Last Post by Ancient Dragon
0

Then you need to have a file in the root directory and use the fstream library to read from it and write to it. When the user clicks one of the buttons or whatever, you'll have a function that is called and figures out what to read/write based on whatever (the state of the buttons, I guess). Figure out how you want that to be represented in the file and write to it/read from it using fstream.

0

Second page already? Come on guys I really need help... I know I'm a noob...

0

So I could just write a text file and make it have the certain settings?

0

So I could just write a text file and make it have the certain settings?

>> Prefereably a way to put a text file in the programs' root folder.

Yes. That's the goal, right? Figure out what you want to have in the file, then when the program starts, read the file and stick the file contents into whatever variables need them and then do whatever you need to do with them.

When the configuration changes, write to the file with the new settings.

0

Ok thanks. I though this might have worked but I didnt know for sure. Now to go find out how to word the syntax. haha. Thank you very much VernonDozier. I really appriciate the help. :)
-TSims11

0

Assuming this is an MS-Windows program you could put the settings in the registry, such as HKEY_CURRENT_USER/Software/<Your Program Name Here>. That way your program can get the settings regardless of where the program is on a computer.

Edited by Ancient Dragon: n/a

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.