Modernes C++ programmieren

Okt 23, 2024

lst-0557-godb.cpp

//#(compile) c++; compiler:g132; options:-O3 -std=c++23; libs:-
// https://godbolt.org/z/6coqbhfKM 
// …hier Inhalt von <vector>…
// …hier Inhalt von <iostream>…
using container_type = std::vector<int>;
static constexpr unsigned SIZE = 10;
int main() {
  { (std::cout) << "Programmstart" << "\n"; }
  container_type data(SIZE);
  { (std::cout) << "Der Container hat " << data.size() << " Elemente." << "\n";}
  { (std::cout) << "Programmende" << "\n"; }
  { std::cout << "Das ging ja noch mal gut.\n"; }
}