Source File: ex57.cpp

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

class AnnoyingPerson {
  std::string name;
  int age;

public:
  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;

  // forced to do this, which has potential errors
  zed.setName("Zed");
  zed.setAge(51);

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