
-----------------------------------
jonos
Thu Feb 12, 2004 10:40 pm

re - initializing a variable
-----------------------------------
i don't think that is the word for this but i want to set a variable to add one to itself after an if statment. i have tried:

points = points+1
points++
points+1
points = points++

and they don't work.

this is what im trying to do:

cout  ans;
if (ans =="y")
{
points++;
}


if anyone knows the problem, could you ;lease help me thanks

-----------------------------------
Catalyst
Thu Feb 12, 2004 11:11 pm


-----------------------------------

points++;
points = points+1 ;
points+=1;


all should work
maybe some more the code would help

-----------------------------------
jonos
Fri Feb 13, 2004 11:57 am


-----------------------------------
lame communist exposer:


cout  ans;
if (ans == "y")
{
points ++;
}
cout 