[Home]
[Edit this page]
[Recent Changes]
[Special Pages]
[Help]
CIncrementOperator
Its opposite operator is the decrement operator, --.
There are three ways to increment a value by 1:
[Edit this page] [Page history] [What links here] [Discuss this topic] [Printer Friendly]
CIncrementOperator
(C) ++ operator
The increment operator is used to raise an int's value by one.Its opposite operator is the decrement operator, --.
int i = 0; i++; assert(i==1);
- include <cassert>
There are three ways to increment a value by 1:
1) i = i + 1; 2) i += 1; 3) i++;
'Increment operator' links
[Edit this page] [Page history] [What links here] [Discuss this topic] [Printer Friendly]
