Skip to content

Commit 88231e9

Browse files
authored
Format code in "Postfix Increment and Decrement Operators"
1 parent 02d79a0 commit 88231e9

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

docs/cpp/postfix-increment-and-decrement-operators-increment-and-decrement.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,11 @@ The following code illustrates the postfix increment operator:
4343
#include <iostream>
4444
using namespace std;
4545

46-
int main() {
47-
int i = 10;
48-
cout << i++ << endl;
49-
cout << i << endl;
46+
int main()
47+
{
48+
int i = 10;
49+
cout << i++ << endl;
50+
cout << i << endl;
5051
}
5152
```
5253

@@ -55,7 +56,7 @@ Postincrement and postdecrement operations on enumerated types are not supported
5556
```cpp
5657
enum Compass { North, South, East, West };
5758
Compass myCompass;
58-
for( myCompass = North; myCompass != West; myCompass++ ); // Error
59+
for (myCompass = North; myCompass != West; myCompass++); // Error
5960
```
6061
6162
## See also

0 commit comments

Comments
 (0)