Clear All Variable Values
Hi. I have a program that goes a little like this:
// Include files, etc...
int main()
//code...
if (input == "logout");
{
return main();
}
// rest of the code
Now, every time the program goes to main, the values previously stored in the varibles are still there. I am looking for a way to start with a clean slate and wipe all of the variables.
cppnewb
Junior Poster in Training
52 posts since Jan 2009
Reputation Points: 10
Solved Threads: 0
Just reset the variables to an empty string
input = "";
iamthwee
Posting Expert
5,950 posts since Aug 2005
Reputation Points: 1,543
Solved Threads: 439