Source File: ex58.cpp

#include <fmt/core.h>
#include <chrono>
#include <thread>
#include <string>

class AnnoyingPerson {
  std::string name;
  int age;
  // NOTE: need a way to demonstrate destructors too

public:
  AnnoyingPerson(const std::string& name, int age)
    : name(name), age(age) { }

  int getAge() {
    return age;
  }

  const std::string& getName() {
    return name;
  }

  void setAge(int age) {
    this->age = age;
  }

  void setName(const std::string& name) {
    this->name = name;
  }
};

int main(int argc, char* argv[]) {
  // try doing the initialize like before to see the error
  AnnoyingPerson zed{"Zed", 51};

  fmt::println("I am {} and I am {} years old.",
      zed.getName(), zed.getAge());
}