Why hasn't my variable changed after applying a bit-shift operator to it?

Viewed 11052
int main()
{
    int i=3;
    (i << 1);
    cout << i; //Prints 3
}

I expected to get 6 because of shifting left one bit. Why does it not work?

7 Answers
Related