Increment Operation doesn't work

OK, here's the deal I want an integer to increase as I press a button and decrease as I press the other button.

int value =0;
if (digitalRead(0) == HIGH) {
value = (value++);
}
if (digitalRead(1) == HIGH) {
value = (value--);
}

I'm checking the integer in Serial Monitor and all I get is 0.

You're not using it correctly.

//replace value = (value++);
//with
value++;


//replace value = (value--);
//with
value--;

KenF:
You're not using it correctly.

//replace value = (value++);

//with
value++;

//replace value = (value--);
//with
value--;

OK turns out I couldn't properly connect the buttons to the ground. After fixing that and replacing my code with yours I see that number only changes when the button is pressed and then reverts back to its original value when it is unpressed.

Shouldn't it remain changed? What do I have to do for that?

Which pins are you using for the inputs, have they got pulldown resistors, how are you viewing the values, which Arduino are you using ?

Oh, and please post your complete program !

Move int value =0; to somewhere outside the loop function. I'll warn you though, in it's current incarnation, it will increment and decrement so fast that it'll appear to give you random values.

http://snippets-r-us.com/

I thought it would be nice to have that link actually be educational.

yes.. it is.