how to create increment and decrement in C++ code example Example: decrement c++ int x = 5; x--; cout << x << endl; //outputs 4