C++ examples for Operator:Increment and decrement operators
Use increment operator.
#include <iostream> using namespace std; int main()//from w w w. j a va2 s. c o m { int count; count = 0; cout << "The initial value of count is " << count << endl; count++; cout << " count is now " << count << endl; count++; cout << " count is now " << count << endl; count++; cout << " count is now " << count << endl; count++; cout << " count is now " << count << endl; return 0; }