diff --git a/AdventOfCode2022.vcxproj b/AdventOfCode2022.vcxproj index cbb3a08..ecca0ba 100644 --- a/AdventOfCode2022.vcxproj +++ b/AdventOfCode2022.vcxproj @@ -151,6 +151,7 @@ + diff --git a/AdventOfCode2022.vcxproj.filters b/AdventOfCode2022.vcxproj.filters index 114ae7b..71c7328 100644 --- a/AdventOfCode2022.vcxproj.filters +++ b/AdventOfCode2022.vcxproj.filters @@ -93,6 +93,9 @@ Source Files + + Source Files + diff --git a/src/days/Source.cpp b/src/days/Source.cpp index 9d1b58d..e474d3b 100644 --- a/src/days/Source.cpp +++ b/src/days/Source.cpp @@ -1,7 +1,7 @@ #include "../aoc2022.h" template -struct SDay01 : public SDay { +struct SDay0 : public SDay { //Class constructor using SDay::SDay; diff --git a/src/days/day01.cpp b/src/days/day01.cpp index e69de29..6b3b060 100644 --- a/src/days/day01.cpp +++ b/src/days/day01.cpp @@ -0,0 +1,11 @@ +#include "../aoc2022.h" + +template +struct SDay01 : public SDay { + //Class constructor + using SDay::SDay; + + //Solutions to both days + Output part1() const override final { return Output(); } + Output part2() const override final { return Output(); } +}; diff --git a/src/days/day02.cpp b/src/days/day02.cpp index e69de29..971bb77 100644 --- a/src/days/day02.cpp +++ b/src/days/day02.cpp @@ -0,0 +1,11 @@ +#include "../aoc2022.h" + +template +struct SDay02 : public SDay { + //Class constructor + using SDay::SDay; + + //Solutions to both days + Output part1() const override final { return Output(); } + Output part2() const override final { return Output(); } +}; diff --git a/src/days/day03.cpp b/src/days/day03.cpp index e69de29..d5cd77a 100644 --- a/src/days/day03.cpp +++ b/src/days/day03.cpp @@ -0,0 +1,11 @@ +#include "../aoc2022.h" + +template +struct SDay03 : public SDay { + //Class constructor + using SDay::SDay; + + //Solutions to both days + Output part1() const override final { return Output(); } + Output part2() const override final { return Output(); } +}; diff --git a/src/days/day04.cpp b/src/days/day04.cpp index e69de29..631d86a 100644 --- a/src/days/day04.cpp +++ b/src/days/day04.cpp @@ -0,0 +1,11 @@ +#include "../aoc2022.h" + +template +struct SDay04 : public SDay { + //Class constructor + using SDay::SDay; + + //Solutions to both days + Output part1() const override final { return Output(); } + Output part2() const override final { return Output(); } +}; diff --git a/src/days/day05.cpp b/src/days/day05.cpp index e69de29..ba1127a 100644 --- a/src/days/day05.cpp +++ b/src/days/day05.cpp @@ -0,0 +1,11 @@ +#include "../aoc2022.h" + +template +struct SDay05 : public SDay { + //Class constructor + using SDay::SDay; + + //Solutions to both days + Output part1() const override final { return Output(); } + Output part2() const override final { return Output(); } +}; diff --git a/src/days/day06.cpp b/src/days/day06.cpp index e69de29..f9230df 100644 --- a/src/days/day06.cpp +++ b/src/days/day06.cpp @@ -0,0 +1,11 @@ +#include "../aoc2022.h" + +template +struct SDay06 : public SDay { + //Class constructor + using SDay::SDay; + + //Solutions to both days + Output part1() const override final { return Output(); } + Output part2() const override final { return Output(); } +}; diff --git a/src/days/day07.cpp b/src/days/day07.cpp index e69de29..78338dd 100644 --- a/src/days/day07.cpp +++ b/src/days/day07.cpp @@ -0,0 +1,11 @@ +#include "../aoc2022.h" + +template +struct SDay07 : public SDay { + //Class constructor + using SDay::SDay; + + //Solutions to both days + Output part1() const override final { return Output(); } + Output part2() const override final { return Output(); } +}; diff --git a/src/days/day08.cpp b/src/days/day08.cpp index e69de29..9e14830 100644 --- a/src/days/day08.cpp +++ b/src/days/day08.cpp @@ -0,0 +1,11 @@ +#include "../aoc2022.h" + +template +struct SDay08 : public SDay { + //Class constructor + using SDay::SDay; + + //Solutions to both days + Output part1() const override final { return Output(); } + Output part2() const override final { return Output(); } +}; diff --git a/src/days/day09.cpp b/src/days/day09.cpp index e69de29..37da059 100644 --- a/src/days/day09.cpp +++ b/src/days/day09.cpp @@ -0,0 +1,11 @@ +#include "../aoc2022.h" + +template +struct SDay09 : public SDay { + //Class constructor + using SDay::SDay; + + //Solutions to both days + Output part1() const override final { return Output(); } + Output part2() const override final { return Output(); } +}; diff --git a/src/days/day10.cpp b/src/days/day10.cpp index e69de29..d036e66 100644 --- a/src/days/day10.cpp +++ b/src/days/day10.cpp @@ -0,0 +1,11 @@ +#include "../aoc2022.h" + +template +struct SDay10 : public SDay { + //Class constructor + using SDay::SDay; + + //Solutions to both days + Output part1() const override final { return Output(); } + Output part2() const override final { return Output(); } +}; diff --git a/src/days/day11.cpp b/src/days/day11.cpp index e69de29..74a72bc 100644 --- a/src/days/day11.cpp +++ b/src/days/day11.cpp @@ -0,0 +1,11 @@ +#include "../aoc2022.h" + +template +struct SDay11 : public SDay { + //Class constructor + using SDay::SDay; + + //Solutions to both days + Output part1() const override final { return Output(); } + Output part2() const override final { return Output(); } +}; diff --git a/src/days/day12.cpp b/src/days/day12.cpp index e69de29..92e3c13 100644 --- a/src/days/day12.cpp +++ b/src/days/day12.cpp @@ -0,0 +1,11 @@ +#include "../aoc2022.h" + +template +struct SDay12 : public SDay { + //Class constructor + using SDay::SDay; + + //Solutions to both days + Output part1() const override final { return Output(); } + Output part2() const override final { return Output(); } +}; diff --git a/src/days/day13.cpp b/src/days/day13.cpp index e69de29..cf8d735 100644 --- a/src/days/day13.cpp +++ b/src/days/day13.cpp @@ -0,0 +1,11 @@ +#include "../aoc2022.h" + +template +struct SDay13 : public SDay { + //Class constructor + using SDay::SDay; + + //Solutions to both days + Output part1() const override final { return Output(); } + Output part2() const override final { return Output(); } +}; diff --git a/src/days/day14.cpp b/src/days/day14.cpp index e69de29..8185bad 100644 --- a/src/days/day14.cpp +++ b/src/days/day14.cpp @@ -0,0 +1,11 @@ +#include "../aoc2022.h" + +template +struct SDay14 : public SDay { + //Class constructor + using SDay::SDay; + + //Solutions to both days + Output part1() const override final { return Output(); } + Output part2() const override final { return Output(); } +}; diff --git a/src/days/day15.cpp b/src/days/day15.cpp index e69de29..22ce16f 100644 --- a/src/days/day15.cpp +++ b/src/days/day15.cpp @@ -0,0 +1,11 @@ +#include "../aoc2022.h" + +template +struct SDay15 : public SDay { + //Class constructor + using SDay::SDay; + + //Solutions to both days + Output part1() const override final { return Output(); } + Output part2() const override final { return Output(); } +}; diff --git a/src/days/day16.cpp b/src/days/day16.cpp index e69de29..4b86f4d 100644 --- a/src/days/day16.cpp +++ b/src/days/day16.cpp @@ -0,0 +1,11 @@ +#include "../aoc2022.h" + +template +struct SDay16 : public SDay { + //Class constructor + using SDay::SDay; + + //Solutions to both days + Output part1() const override final { return Output(); } + Output part2() const override final { return Output(); } +}; diff --git a/src/days/day17.cpp b/src/days/day17.cpp index e69de29..0a6c695 100644 --- a/src/days/day17.cpp +++ b/src/days/day17.cpp @@ -0,0 +1,11 @@ +#include "../aoc2022.h" + +template +struct SDay17 : public SDay { + //Class constructor + using SDay::SDay; + + //Solutions to both days + Output part1() const override final { return Output(); } + Output part2() const override final { return Output(); } +}; diff --git a/src/days/day18.cpp b/src/days/day18.cpp index e69de29..79c155b 100644 --- a/src/days/day18.cpp +++ b/src/days/day18.cpp @@ -0,0 +1,11 @@ +#include "../aoc2022.h" + +template +struct SDay18 : public SDay { + //Class constructor + using SDay::SDay; + + //Solutions to both days + Output part1() const override final { return Output(); } + Output part2() const override final { return Output(); } +}; diff --git a/src/days/day19.cpp b/src/days/day19.cpp index e69de29..802328c 100644 --- a/src/days/day19.cpp +++ b/src/days/day19.cpp @@ -0,0 +1,11 @@ +#include "../aoc2022.h" + +template +struct SDay19 : public SDay { + //Class constructor + using SDay::SDay; + + //Solutions to both days + Output part1() const override final { return Output(); } + Output part2() const override final { return Output(); } +}; diff --git a/src/days/day20.cpp b/src/days/day20.cpp index e69de29..eb07c08 100644 --- a/src/days/day20.cpp +++ b/src/days/day20.cpp @@ -0,0 +1,11 @@ +#include "../aoc2022.h" + +template +struct SDay20 : public SDay { + //Class constructor + using SDay::SDay; + + //Solutions to both days + Output part1() const override final { return Output(); } + Output part2() const override final { return Output(); } +}; diff --git a/src/days/day21.cpp b/src/days/day21.cpp index e69de29..6236615 100644 --- a/src/days/day21.cpp +++ b/src/days/day21.cpp @@ -0,0 +1,11 @@ +#include "../aoc2022.h" + +template +struct SDay21 : public SDay { + //Class constructor + using SDay::SDay; + + //Solutions to both days + Output part1() const override final { return Output(); } + Output part2() const override final { return Output(); } +}; diff --git a/src/days/day22.cpp b/src/days/day22.cpp index e69de29..b42762a 100644 --- a/src/days/day22.cpp +++ b/src/days/day22.cpp @@ -0,0 +1,11 @@ +#include "../aoc2022.h" + +template +struct SDay22 : public SDay { + //Class constructor + using SDay::SDay; + + //Solutions to both days + Output part1() const override final { return Output(); } + Output part2() const override final { return Output(); } +}; diff --git a/src/days/day23.cpp b/src/days/day23.cpp index e69de29..270b302 100644 --- a/src/days/day23.cpp +++ b/src/days/day23.cpp @@ -0,0 +1,11 @@ +#include "../aoc2022.h" + +template +struct SDay23 : public SDay { + //Class constructor + using SDay::SDay; + + //Solutions to both days + Output part1() const override final { return Output(); } + Output part2() const override final { return Output(); } +}; diff --git a/src/days/day24.cpp b/src/days/day24.cpp index e69de29..bf154a9 100644 --- a/src/days/day24.cpp +++ b/src/days/day24.cpp @@ -0,0 +1,11 @@ +#include "../aoc2022.h" + +template +struct SDay24 : public SDay { + //Class constructor + using SDay::SDay; + + //Solutions to both days + Output part1() const override final { return Output(); } + Output part2() const override final { return Output(); } +}; diff --git a/src/days/day25.cpp b/src/days/day25.cpp index e69de29..f92cbf9 100644 --- a/src/days/day25.cpp +++ b/src/days/day25.cpp @@ -0,0 +1,11 @@ +#include "../aoc2022.h" + +template +struct SDay25 : public SDay { + //Class constructor + using SDay::SDay; + + //Solutions to both days + Output part1() const override final { return Output(); } + Output part2() const override final { return Output(); } +}; diff --git a/src/main.cpp b/src/main.cpp index 7788d05..8a1fa04 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -4,9 +4,11 @@ void createDays() { std::string fileName; + std::string line; std::ofstream file; for (int i = 1; i <= 25; i++) { + std::ifstream source{ "src/days/Source.cpp" }; if (i < 10) { file.open("src/days/day0" + std::to_string(i) + ".cpp"); @@ -15,11 +17,15 @@ void createDays() { { file.open("src/days/day" + std::to_string(i) + ".cpp"); } + while (std::getline(source, line)) + { + file << line << "\n"; + } file.close(); } } int main() { - SDay01 day1("day01"); + //SDay01 day1("day01"); createDays(); }