https://rentry.org/PPP2_p101a

// Code derived from Stroustrup's PPP2 book
// § 4.4 Statements
// -beginning on p 101

#include <iostream>

using std::cout;

int main()
{
  int a = 7;
  cout << a << '\n';

  // 1 + 2;  // do an addition, but don’t use the sum

  // a * b;  // do a multiplication, but don’t use the product
}

build & run:

g++ -std=c++20 -O2 -Wall -pedantic ./ch_04/main_p101a.cpp && ./a.out

PrevUpNext

Edit
Pub: 25 Jan 2023 10:56 UTC
Edit: 29 Apr 2023 06:55 UTC
Views: 602