int a,b=3; // b is initialised to the value 3
cin>>a; // we get input in to a, in this case its 0
if(a) // a == 0
b=a++ -1; // this does not execute
cout<<a<<endl; // print out the value of a, 0
cout<<b<<endl; // print out the value of b, 3
If you would like the if to execute when the value is 0, you can do this
1 2 3 4 5 6
int a,b=3;
cin>>a;
if(a == 0)
b=a++ -1;
cout<<a<<endl;
cout<<b<<endl;