diff --git a/fill.py b/fill.py new file mode 100644 index 0000000..a30d658 --- /dev/null +++ b/fill.py @@ -0,0 +1,17 @@ +import os + + +preH = open("pre.h", "r").read() +preCpp = open("pre.cpp", "r").read() + +for dayNum in range(1, 26): + pad = f'{dayNum:02}' + dirName = f"src/days/{pad}" + try: + os.mkdir(dirName) + except OSError: + continue + with open(f"{dirName}/Day{pad}.h", "w") as file: + file.write(preH.replace("XX", pad)) + with open(f"{dirName}/Day{pad}.cpp", "w") as file: + file.write(preCpp.replace("XX", pad)) diff --git a/pre.cpp b/pre.cpp new file mode 100644 index 0000000..9ab60a3 --- /dev/null +++ b/pre.cpp @@ -0,0 +1,10 @@ + +#include "DayXX.h" + +Result DayXX::Task1() { + return Day::Task1(); +} + +Result DayXX::Task2() { + return Day::Task2(); +} diff --git a/pre.h b/pre.h new file mode 100644 index 0000000..afa0ca7 --- /dev/null +++ b/pre.h @@ -0,0 +1,14 @@ + +#ifndef ADVENTOFCODE2022_DAYXX_H +#define ADVENTOFCODE2022_DAYXX_H + +#include "../../Day.h" + +class DayXX : public Day { +protected: + Result Task1() override; + Result Task2() override; +}; + + +#endif diff --git a/src/Day.h b/src/Day.h index f66b086..4e09fc5 100644 --- a/src/Day.h +++ b/src/Day.h @@ -1,8 +1,8 @@ #ifndef ADVENTOFCODE2022_DAY_H #define ADVENTOFCODE2022_DAY_H -#include "util.h" #include +#include "util.h" using namespace std::chrono; typedef std::string Result; @@ -14,10 +14,8 @@ protected: virtual Result Task1() { return ""; } virtual Result Task2() { return ""; } public: - explicit Day() = default; - ~Day() = default; int run(Input &_input) { - this->input = _input; + input = _input; auto start = high_resolution_clock::now(); diff --git a/src/days.h b/src/days.h deleted file mode 100644 index 78676a4..0000000 --- a/src/days.h +++ /dev/null @@ -1,17 +0,0 @@ - -#ifndef ADVENTOFCODE2022_DAYS_H -#define ADVENTOFCODE2022_DAYS_H - -#include "01/Day01.h" -#include "02/Day02.h" -#include "03/Day03.h" - -std::vector getAllDays(){ - return std::vector { - new Day01(), - new Day02(), - new Day03() - }; -} - -#endif diff --git a/src/01/Day01.cpp b/src/days/01/Day01.cpp similarity index 100% rename from src/01/Day01.cpp rename to src/days/01/Day01.cpp diff --git a/src/01/Day01.h b/src/days/01/Day01.h similarity index 88% rename from src/01/Day01.h rename to src/days/01/Day01.h index 4aaa86f..2e7a501 100644 --- a/src/01/Day01.h +++ b/src/days/01/Day01.h @@ -2,7 +2,7 @@ #ifndef ADVENTOFCODE2022_DAY01_H #define ADVENTOFCODE2022_DAY01_H -#include "../Day.h" +#include "../../Day.h" class Day01 : public Day { protected: diff --git a/src/02/Day02.cpp b/src/days/02/Day02.cpp similarity index 100% rename from src/02/Day02.cpp rename to src/days/02/Day02.cpp diff --git a/src/02/Day02.h b/src/days/02/Day02.h similarity index 88% rename from src/02/Day02.h rename to src/days/02/Day02.h index a9f5203..159153f 100644 --- a/src/02/Day02.h +++ b/src/days/02/Day02.h @@ -2,7 +2,7 @@ #ifndef ADVENTOFCODE2022_DAY02_H #define ADVENTOFCODE2022_DAY02_H -#include "../Day.h" +#include "../../Day.h" class Day02 : public Day { protected: diff --git a/src/03/Day03.cpp b/src/days/03/Day03.cpp similarity index 100% rename from src/03/Day03.cpp rename to src/days/03/Day03.cpp diff --git a/src/03/Day03.h b/src/days/03/Day03.h similarity index 88% rename from src/03/Day03.h rename to src/days/03/Day03.h index 250f212..fd1dbe8 100644 --- a/src/03/Day03.h +++ b/src/days/03/Day03.h @@ -2,7 +2,7 @@ #ifndef ADVENTOFCODE2022_DAY03_H #define ADVENTOFCODE2022_DAY03_H -#include "../Day.h" +#include "../../Day.h" class Day03 : public Day { protected: diff --git a/src/days/04/Day04.cpp b/src/days/04/Day04.cpp new file mode 100644 index 0000000..97eabaa --- /dev/null +++ b/src/days/04/Day04.cpp @@ -0,0 +1,10 @@ + +#include "Day04.h" + +Result Day04::Task1() { + return Day::Task1(); +} + +Result Day04::Task2() { + return Day::Task2(); +} diff --git a/src/days/04/Day04.h b/src/days/04/Day04.h new file mode 100644 index 0000000..01654b6 --- /dev/null +++ b/src/days/04/Day04.h @@ -0,0 +1,14 @@ + +#ifndef ADVENTOFCODE2022_DAY04_H +#define ADVENTOFCODE2022_DAY04_H + +#include "../../Day.h" + +class Day04 : public Day { +protected: + Result Task1() override; + Result Task2() override; +}; + + +#endif diff --git a/src/days/05/Day05.cpp b/src/days/05/Day05.cpp new file mode 100644 index 0000000..9f12e14 --- /dev/null +++ b/src/days/05/Day05.cpp @@ -0,0 +1,10 @@ + +#include "Day05.h" + +Result Day05::Task1() { + return Day::Task1(); +} + +Result Day05::Task2() { + return Day::Task2(); +} diff --git a/src/days/05/Day05.h b/src/days/05/Day05.h new file mode 100644 index 0000000..f46acb9 --- /dev/null +++ b/src/days/05/Day05.h @@ -0,0 +1,14 @@ + +#ifndef ADVENTOFCODE2022_DAY05_H +#define ADVENTOFCODE2022_DAY05_H + +#include "../../Day.h" + +class Day05 : public Day { +protected: + Result Task1() override; + Result Task2() override; +}; + + +#endif diff --git a/src/days/06/Day06.cpp b/src/days/06/Day06.cpp new file mode 100644 index 0000000..a92a1e6 --- /dev/null +++ b/src/days/06/Day06.cpp @@ -0,0 +1,10 @@ + +#include "Day06.h" + +Result Day06::Task1() { + return Day::Task1(); +} + +Result Day06::Task2() { + return Day::Task2(); +} diff --git a/src/days/06/Day06.h b/src/days/06/Day06.h new file mode 100644 index 0000000..a55ee7e --- /dev/null +++ b/src/days/06/Day06.h @@ -0,0 +1,14 @@ + +#ifndef ADVENTOFCODE2022_DAY06_H +#define ADVENTOFCODE2022_DAY06_H + +#include "../../Day.h" + +class Day06 : public Day { +protected: + Result Task1() override; + Result Task2() override; +}; + + +#endif diff --git a/src/days/07/Day07.cpp b/src/days/07/Day07.cpp new file mode 100644 index 0000000..59955bb --- /dev/null +++ b/src/days/07/Day07.cpp @@ -0,0 +1,10 @@ + +#include "Day07.h" + +Result Day07::Task1() { + return Day::Task1(); +} + +Result Day07::Task2() { + return Day::Task2(); +} diff --git a/src/days/07/Day07.h b/src/days/07/Day07.h new file mode 100644 index 0000000..723dd62 --- /dev/null +++ b/src/days/07/Day07.h @@ -0,0 +1,14 @@ + +#ifndef ADVENTOFCODE2022_DAY07_H +#define ADVENTOFCODE2022_DAY07_H + +#include "../../Day.h" + +class Day07 : public Day { +protected: + Result Task1() override; + Result Task2() override; +}; + + +#endif diff --git a/src/days/08/Day08.cpp b/src/days/08/Day08.cpp new file mode 100644 index 0000000..c3222c2 --- /dev/null +++ b/src/days/08/Day08.cpp @@ -0,0 +1,10 @@ + +#include "Day08.h" + +Result Day08::Task1() { + return Day::Task1(); +} + +Result Day08::Task2() { + return Day::Task2(); +} diff --git a/src/days/08/Day08.h b/src/days/08/Day08.h new file mode 100644 index 0000000..7104156 --- /dev/null +++ b/src/days/08/Day08.h @@ -0,0 +1,14 @@ + +#ifndef ADVENTOFCODE2022_DAY08_H +#define ADVENTOFCODE2022_DAY08_H + +#include "../../Day.h" + +class Day08 : public Day { +protected: + Result Task1() override; + Result Task2() override; +}; + + +#endif diff --git a/src/days/09/Day09.cpp b/src/days/09/Day09.cpp new file mode 100644 index 0000000..ccd0f65 --- /dev/null +++ b/src/days/09/Day09.cpp @@ -0,0 +1,10 @@ + +#include "Day09.h" + +Result Day09::Task1() { + return Day::Task1(); +} + +Result Day09::Task2() { + return Day::Task2(); +} diff --git a/src/days/09/Day09.h b/src/days/09/Day09.h new file mode 100644 index 0000000..2c7989c --- /dev/null +++ b/src/days/09/Day09.h @@ -0,0 +1,14 @@ + +#ifndef ADVENTOFCODE2022_DAY09_H +#define ADVENTOFCODE2022_DAY09_H + +#include "../../Day.h" + +class Day09 : public Day { +protected: + Result Task1() override; + Result Task2() override; +}; + + +#endif diff --git a/src/days/10/Day10.cpp b/src/days/10/Day10.cpp new file mode 100644 index 0000000..77f588c --- /dev/null +++ b/src/days/10/Day10.cpp @@ -0,0 +1,10 @@ + +#include "Day10.h" + +Result Day10::Task1() { + return Day::Task1(); +} + +Result Day10::Task2() { + return Day::Task2(); +} diff --git a/src/days/10/Day10.h b/src/days/10/Day10.h new file mode 100644 index 0000000..5c7f65d --- /dev/null +++ b/src/days/10/Day10.h @@ -0,0 +1,14 @@ + +#ifndef ADVENTOFCODE2022_DAY10_H +#define ADVENTOFCODE2022_DAY10_H + +#include "../../Day.h" + +class Day10 : public Day { +protected: + Result Task1() override; + Result Task2() override; +}; + + +#endif diff --git a/src/days/11/Day11.cpp b/src/days/11/Day11.cpp new file mode 100644 index 0000000..fa0b845 --- /dev/null +++ b/src/days/11/Day11.cpp @@ -0,0 +1,10 @@ + +#include "Day11.h" + +Result Day11::Task1() { + return Day::Task1(); +} + +Result Day11::Task2() { + return Day::Task2(); +} diff --git a/src/days/11/Day11.h b/src/days/11/Day11.h new file mode 100644 index 0000000..8065af1 --- /dev/null +++ b/src/days/11/Day11.h @@ -0,0 +1,14 @@ + +#ifndef ADVENTOFCODE2022_DAY11_H +#define ADVENTOFCODE2022_DAY11_H + +#include "../../Day.h" + +class Day11 : public Day { +protected: + Result Task1() override; + Result Task2() override; +}; + + +#endif diff --git a/src/days/12/Day12.cpp b/src/days/12/Day12.cpp new file mode 100644 index 0000000..614e0fe --- /dev/null +++ b/src/days/12/Day12.cpp @@ -0,0 +1,10 @@ + +#include "Day12.h" + +Result Day12::Task1() { + return Day::Task1(); +} + +Result Day12::Task2() { + return Day::Task2(); +} diff --git a/src/days/12/Day12.h b/src/days/12/Day12.h new file mode 100644 index 0000000..ffceb87 --- /dev/null +++ b/src/days/12/Day12.h @@ -0,0 +1,14 @@ + +#ifndef ADVENTOFCODE2022_DAY12_H +#define ADVENTOFCODE2022_DAY12_H + +#include "../../Day.h" + +class Day12 : public Day { +protected: + Result Task1() override; + Result Task2() override; +}; + + +#endif diff --git a/src/days/13/Day13.cpp b/src/days/13/Day13.cpp new file mode 100644 index 0000000..c642d2a --- /dev/null +++ b/src/days/13/Day13.cpp @@ -0,0 +1,10 @@ + +#include "Day13.h" + +Result Day13::Task1() { + return Day::Task1(); +} + +Result Day13::Task2() { + return Day::Task2(); +} diff --git a/src/days/13/Day13.h b/src/days/13/Day13.h new file mode 100644 index 0000000..2e1e276 --- /dev/null +++ b/src/days/13/Day13.h @@ -0,0 +1,14 @@ + +#ifndef ADVENTOFCODE2022_DAY13_H +#define ADVENTOFCODE2022_DAY13_H + +#include "../../Day.h" + +class Day13 : public Day { +protected: + Result Task1() override; + Result Task2() override; +}; + + +#endif diff --git a/src/days/14/Day14.cpp b/src/days/14/Day14.cpp new file mode 100644 index 0000000..93be9e9 --- /dev/null +++ b/src/days/14/Day14.cpp @@ -0,0 +1,10 @@ + +#include "Day14.h" + +Result Day14::Task1() { + return Day::Task1(); +} + +Result Day14::Task2() { + return Day::Task2(); +} diff --git a/src/days/14/Day14.h b/src/days/14/Day14.h new file mode 100644 index 0000000..cf944c1 --- /dev/null +++ b/src/days/14/Day14.h @@ -0,0 +1,14 @@ + +#ifndef ADVENTOFCODE2022_DAY14_H +#define ADVENTOFCODE2022_DAY14_H + +#include "../../Day.h" + +class Day14 : public Day { +protected: + Result Task1() override; + Result Task2() override; +}; + + +#endif diff --git a/src/days/15/Day15.cpp b/src/days/15/Day15.cpp new file mode 100644 index 0000000..3a7b5fe --- /dev/null +++ b/src/days/15/Day15.cpp @@ -0,0 +1,10 @@ + +#include "Day15.h" + +Result Day15::Task1() { + return Day::Task1(); +} + +Result Day15::Task2() { + return Day::Task2(); +} diff --git a/src/days/15/Day15.h b/src/days/15/Day15.h new file mode 100644 index 0000000..f9e97d0 --- /dev/null +++ b/src/days/15/Day15.h @@ -0,0 +1,14 @@ + +#ifndef ADVENTOFCODE2022_DAY15_H +#define ADVENTOFCODE2022_DAY15_H + +#include "../../Day.h" + +class Day15 : public Day { +protected: + Result Task1() override; + Result Task2() override; +}; + + +#endif diff --git a/src/days/16/Day16.cpp b/src/days/16/Day16.cpp new file mode 100644 index 0000000..b88086c --- /dev/null +++ b/src/days/16/Day16.cpp @@ -0,0 +1,10 @@ + +#include "Day16.h" + +Result Day16::Task1() { + return Day::Task1(); +} + +Result Day16::Task2() { + return Day::Task2(); +} diff --git a/src/days/16/Day16.h b/src/days/16/Day16.h new file mode 100644 index 0000000..ecf4f9b --- /dev/null +++ b/src/days/16/Day16.h @@ -0,0 +1,14 @@ + +#ifndef ADVENTOFCODE2022_DAY16_H +#define ADVENTOFCODE2022_DAY16_H + +#include "../../Day.h" + +class Day16 : public Day { +protected: + Result Task1() override; + Result Task2() override; +}; + + +#endif diff --git a/src/days/17/Day17.cpp b/src/days/17/Day17.cpp new file mode 100644 index 0000000..e944046 --- /dev/null +++ b/src/days/17/Day17.cpp @@ -0,0 +1,10 @@ + +#include "Day17.h" + +Result Day17::Task1() { + return Day::Task1(); +} + +Result Day17::Task2() { + return Day::Task2(); +} diff --git a/src/days/17/Day17.h b/src/days/17/Day17.h new file mode 100644 index 0000000..ea1dc4b --- /dev/null +++ b/src/days/17/Day17.h @@ -0,0 +1,14 @@ + +#ifndef ADVENTOFCODE2022_DAY17_H +#define ADVENTOFCODE2022_DAY17_H + +#include "../../Day.h" + +class Day17 : public Day { +protected: + Result Task1() override; + Result Task2() override; +}; + + +#endif diff --git a/src/days/18/Day18.cpp b/src/days/18/Day18.cpp new file mode 100644 index 0000000..d3fe490 --- /dev/null +++ b/src/days/18/Day18.cpp @@ -0,0 +1,10 @@ + +#include "Day18.h" + +Result Day18::Task1() { + return Day::Task1(); +} + +Result Day18::Task2() { + return Day::Task2(); +} diff --git a/src/days/18/Day18.h b/src/days/18/Day18.h new file mode 100644 index 0000000..997c8e3 --- /dev/null +++ b/src/days/18/Day18.h @@ -0,0 +1,14 @@ + +#ifndef ADVENTOFCODE2022_DAY18_H +#define ADVENTOFCODE2022_DAY18_H + +#include "../../Day.h" + +class Day18 : public Day { +protected: + Result Task1() override; + Result Task2() override; +}; + + +#endif diff --git a/src/days/19/Day19.cpp b/src/days/19/Day19.cpp new file mode 100644 index 0000000..9a21fc2 --- /dev/null +++ b/src/days/19/Day19.cpp @@ -0,0 +1,10 @@ + +#include "Day19.h" + +Result Day19::Task1() { + return Day::Task1(); +} + +Result Day19::Task2() { + return Day::Task2(); +} diff --git a/src/days/19/Day19.h b/src/days/19/Day19.h new file mode 100644 index 0000000..279448f --- /dev/null +++ b/src/days/19/Day19.h @@ -0,0 +1,14 @@ + +#ifndef ADVENTOFCODE2022_DAY19_H +#define ADVENTOFCODE2022_DAY19_H + +#include "../../Day.h" + +class Day19 : public Day { +protected: + Result Task1() override; + Result Task2() override; +}; + + +#endif diff --git a/src/days/20/Day20.cpp b/src/days/20/Day20.cpp new file mode 100644 index 0000000..01ab365 --- /dev/null +++ b/src/days/20/Day20.cpp @@ -0,0 +1,10 @@ + +#include "Day20.h" + +Result Day20::Task1() { + return Day::Task1(); +} + +Result Day20::Task2() { + return Day::Task2(); +} diff --git a/src/days/20/Day20.h b/src/days/20/Day20.h new file mode 100644 index 0000000..bbabff5 --- /dev/null +++ b/src/days/20/Day20.h @@ -0,0 +1,14 @@ + +#ifndef ADVENTOFCODE2022_DAY20_H +#define ADVENTOFCODE2022_DAY20_H + +#include "../../Day.h" + +class Day20 : public Day { +protected: + Result Task1() override; + Result Task2() override; +}; + + +#endif diff --git a/src/days/21/Day21.cpp b/src/days/21/Day21.cpp new file mode 100644 index 0000000..f13a97c --- /dev/null +++ b/src/days/21/Day21.cpp @@ -0,0 +1,10 @@ + +#include "Day21.h" + +Result Day21::Task1() { + return Day::Task1(); +} + +Result Day21::Task2() { + return Day::Task2(); +} diff --git a/src/days/21/Day21.h b/src/days/21/Day21.h new file mode 100644 index 0000000..7ace0ae --- /dev/null +++ b/src/days/21/Day21.h @@ -0,0 +1,14 @@ + +#ifndef ADVENTOFCODE2022_DAY21_H +#define ADVENTOFCODE2022_DAY21_H + +#include "../../Day.h" + +class Day21 : public Day { +protected: + Result Task1() override; + Result Task2() override; +}; + + +#endif diff --git a/src/days/22/Day22.cpp b/src/days/22/Day22.cpp new file mode 100644 index 0000000..19739d7 --- /dev/null +++ b/src/days/22/Day22.cpp @@ -0,0 +1,10 @@ + +#include "Day22.h" + +Result Day22::Task1() { + return Day::Task1(); +} + +Result Day22::Task2() { + return Day::Task2(); +} diff --git a/src/days/22/Day22.h b/src/days/22/Day22.h new file mode 100644 index 0000000..3f68030 --- /dev/null +++ b/src/days/22/Day22.h @@ -0,0 +1,14 @@ + +#ifndef ADVENTOFCODE2022_DAY22_H +#define ADVENTOFCODE2022_DAY22_H + +#include "../../Day.h" + +class Day22 : public Day { +protected: + Result Task1() override; + Result Task2() override; +}; + + +#endif diff --git a/src/days/23/Day23.cpp b/src/days/23/Day23.cpp new file mode 100644 index 0000000..575a5cb --- /dev/null +++ b/src/days/23/Day23.cpp @@ -0,0 +1,10 @@ + +#include "Day23.h" + +Result Day23::Task1() { + return Day::Task1(); +} + +Result Day23::Task2() { + return Day::Task2(); +} diff --git a/src/days/23/Day23.h b/src/days/23/Day23.h new file mode 100644 index 0000000..6fcd931 --- /dev/null +++ b/src/days/23/Day23.h @@ -0,0 +1,14 @@ + +#ifndef ADVENTOFCODE2022_DAY23_H +#define ADVENTOFCODE2022_DAY23_H + +#include "../../Day.h" + +class Day23 : public Day { +protected: + Result Task1() override; + Result Task2() override; +}; + + +#endif diff --git a/src/days/24/Day24.cpp b/src/days/24/Day24.cpp new file mode 100644 index 0000000..657d6c1 --- /dev/null +++ b/src/days/24/Day24.cpp @@ -0,0 +1,10 @@ + +#include "Day24.h" + +Result Day24::Task1() { + return Day::Task1(); +} + +Result Day24::Task2() { + return Day::Task2(); +} diff --git a/src/days/24/Day24.h b/src/days/24/Day24.h new file mode 100644 index 0000000..f6df388 --- /dev/null +++ b/src/days/24/Day24.h @@ -0,0 +1,14 @@ + +#ifndef ADVENTOFCODE2022_DAY24_H +#define ADVENTOFCODE2022_DAY24_H + +#include "../../Day.h" + +class Day24 : public Day { +protected: + Result Task1() override; + Result Task2() override; +}; + + +#endif diff --git a/src/days/25/Day25.cpp b/src/days/25/Day25.cpp new file mode 100644 index 0000000..7221b7a --- /dev/null +++ b/src/days/25/Day25.cpp @@ -0,0 +1,10 @@ + +#include "Day25.h" + +Result Day25::Task1() { + return Day::Task1(); +} + +Result Day25::Task2() { + return Day::Task2(); +} diff --git a/src/days/25/Day25.h b/src/days/25/Day25.h new file mode 100644 index 0000000..8a2f264 --- /dev/null +++ b/src/days/25/Day25.h @@ -0,0 +1,14 @@ + +#ifndef ADVENTOFCODE2022_DAY25_H +#define ADVENTOFCODE2022_DAY25_H + +#include "../../Day.h" + +class Day25 : public Day { +protected: + Result Task1() override; + Result Task2() override; +}; + + +#endif diff --git a/src/days/days.h b/src/days/days.h new file mode 100644 index 0000000..6515650 --- /dev/null +++ b/src/days/days.h @@ -0,0 +1,61 @@ + +#ifndef ADVENTOFCODE2022_DAYS_H +#define ADVENTOFCODE2022_DAYS_H + +#include "01/Day01.h" +#include "02/Day02.h" +#include "03/Day03.h" +#include "04/Day04.h" +#include "05/Day05.h" +#include "06/Day06.h" +#include "07/Day07.h" +#include "08/Day08.h" +#include "09/Day09.h" +#include "10/Day10.h" +#include "11/Day11.h" +#include "12/Day12.h" +#include "13/Day13.h" +#include "14/Day14.h" +#include "15/Day15.h" +#include "16/Day16.h" +#include "17/Day17.h" +#include "18/Day18.h" +#include "19/Day19.h" +#include "20/Day20.h" +#include "21/Day21.h" +#include "22/Day22.h" +#include "23/Day23.h" +#include "24/Day24.h" +#include "25/Day25.h" + +std::vector getAllDays(){ + return { + new Day01(), + new Day02(), + new Day03(), + new Day04(), + new Day05(), + new Day06(), + new Day07(), + new Day08(), + new Day09(), + new Day10(), + new Day11(), + new Day12(), + new Day13(), + new Day14(), + new Day15(), + new Day16(), + new Day17(), + new Day18(), + new Day19(), + new Day20(), + new Day21(), + new Day22(), + new Day23(), + new Day24(), + new Day25() + }; +} + +#endif diff --git a/src/main.cpp b/src/main.cpp index aae7042..92354bd 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,8 +1,7 @@ #include -#include "days.h" #include +#include "days/days.h" -using namespace std::chrono; std::vector getInput(int day, std::string key, bool useTestInput){ std::vector result; @@ -54,8 +53,8 @@ int main(int argc, char *argv[]) { for (int i = 1; i < argc; i++){ int dayNum = std::stoi(argv[i]); std::cout << "Running day " << dayNum << std::endl; - auto input = getInput(dayNum, key, useTestInput); - auto day = days[dayNum - 1]; + Input input = getInput(dayNum, key, useTestInput); + Day* day = days[dayNum - 1]; int code = day->run(input); if (code != 0) return code;