int x;
x = 1;
cout << "A " << x++ + 1 << endl;
x = 1;
cout << "B " << ++x + 1 << endl;
A 2
B 3
That's the basic nature of pre-increment and postincrement.
Line A retrieves the value of x at the start. Then x is incremented afterwards.
Line B first increments x, then retrieves the value.