Keeping a Variable

Hi, I was wondering if there was anyway to set a member variable to an int in such a way that if the program sets it to something, the next time you open up the program, it will still be that number, ie: it doesnt reset
You'll have to save in a file: http://www.cplusplus.com/doc/tutorial/files/
Thanks
Topic archived. No new replies allowed.