https://rentry.org/PPP2_p98 ⎗ ✓ 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22// Code derived from Stroustrup's PPP2 book // § 4.3.2 Operators // -beginning on p 98 #include <iostream> using std::cout; int main() { int a = 10; cout << a << '\n'; ++a; cout << a << '\n'; a += 1; cout << a << '\n'; a = a + 1; cout << a << '\n'; } build & run: g++ -std=c++20 -O2 -Wall -pedantic ./ch_04/main_p98.cpp && ./a.out sauce: Bjarne Stroustrup's PPP2 textbook /robowaifu/'s official C++ learning textbook thread Prev • Up • Next