473,387 Members | 1,464 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Let the program remember the values of the variables

134 100+
Hello,

How can I make sure that variables remember their value? For example if someone uses an option of my program, the counter increases with one 1. But how can I make sure that the counter will remember when the program restart that his value is 1 and not 0. The same goes for a few strings like username and password. Those strings need to remember at any time what there value is.

Thanks in advance.
Jul 29 '11 #1
4 2667
Rabbit
12,516 Expert Mod 8TB
Write it to a file. Or a registry. But if you're going to store a password, make sure you use a hash.
Jul 29 '11 #2
michaeldebruin
134 100+
I don't think a hash is really that neccesary, because I am going to store all the variables at the local computer. But can you give me an example (with some codes, I know how to create streams) how to write variable values in a file or registry and how to hash a password?

Many thanks in advance
Jul 29 '11 #3
GaryTexmo
1,501 Expert 1GB
You can also look at this...

http://msdn.microsoft.com/en-us/libr...=VS.80%29.aspx
Jul 29 '11 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Erwin Moller | last post by:
Hi, Does anybody know if it is possible to suggest to the browser to NOT offer 'remember values' in forms on a page? And if so: how? ;-) I have this situation where a page has a lot of...
2
by: Paul M | last post by:
Hi, This is on an AS/400 which can be a little strange but I think the basic question is portable. I have a (non-C) program that needs to make series of calls to some C programs/functions....
6
by: VB Programmer | last post by:
I am dynamically creating x amout of timers (using System.Timers.Timer). I want each timer to remember it's own set of variables (ex: CustomerBeingProcessed, LastProcessTime, etc...) How can I do...
1
by: Arjen Hoekstra | last post by:
Hello, I've got a datagrid with a textbox in each cell. I've also two buttons, one to add a row to the datagrid and one to delete a row. A user can type data into textboxes and then submit it to...
1
by: samuelberthelot | last post by:
Hi, I have a datagrid with dropdownlist (dpl) column. This is bound to a dynamic datasource, so there can be any number of rows. When the user select a value in one of dpl's, he is redirected to...
9
by: Gary Wessle | last post by:
Hi I am calling a class method on many objects of that class alternately. the class needs to make available "remember" values of variables of said method for each object separetly when the...
2
by: raji20 | last post by:
This is my first page named test.php, In this page iam assigning the value to the session variable username,and I could able to access that value in this page. But when I access the same...
0
by: Piotrek \Alchemik\ | last post by:
Hello, i have a small problem with an operation and remembering values after postback. I have imagemap, where i have some hotspots. After click i'd like to reload image with different one and...
7
by: kr | last post by:
Hi All, Suppose I consider a sample program as given below:- #include<stdio.h> #include<stdlib.h> int i; int main() { char *test(int i); char *tmp = NULL;
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.