well, is there a way to undeclare a variable? like i want to do this:
do
{
int x;
cin>>x
num=num-1
sum=sum+x
(now here is where i want to undeclare x);
}while(num>0);
see, i want to be able to have the user input x, store it in sum, and then be able to go back and input another value of x which will be added to sum.