Source File: ex18.cpp

#include <fmt/core.h>
#include <vector>

using std::string, std::vector;
using namespace fmt;

/* This is a function, just get this working for now
 * and we'll cover them soon.
 */
vector<string> bug_maker() {
  return {"Boo! I'm a Bug!"};
}

int main() {
  vector<string> fruit = {
    "Apple", "Orange", "Pear",
    "Grape", "Durian", "Mango"
  };

  // loop through fruit
  for(auto name : fruit) {
    println("Fruit is {}", name);
  }

  // another way to get it using at()
  for(auto name : fruit) {
    println("Fruit is {}", name);
  }

  for(auto name : bug_maker()) {
    println("Buggy Guitar: {}", name);
  }

  /*
  for(auto name: bug_maker()[0]) {
    println("Probably Crashing: {}", name);
  }
  */
}