2025 framework

This commit is contained in:
Ben Kyd
2025-10-30 09:11:56 +00:00
parent f7072fd78e
commit b89bee9c35
6 changed files with 73 additions and 0 deletions

1
2024/README.md Normal file
View File

@@ -0,0 +1 @@
... oops

15
2025/Makefile Normal file
View File

@@ -0,0 +1,15 @@
CXX := clang++
CXXFLAGS := -std=c++17 -Wall -Wextra -I.
TARGET := aoc
SRC := aoc.cpp
all: $(TARGET)
$(TARGET): $(SRC)
$(CXX) $(CXXFLAGS) $(SRC) -o $(TARGET)
clean:
rm -f $(TARGET)
.PHONY: all clean

BIN
2025/aoc Executable file

Binary file not shown.

15
2025/aoc.cpp Normal file
View File

@@ -0,0 +1,15 @@
#include <iostream>
int main(int argc, char** argv) {
std::cout << "Advent of Code 2025 runner" << std::endl;
std::cout << "©Ben Kyd 2025, All Rights Reserved" << std::endl;
std::cout << "\n\n Usage: -d [day] (omit for all)" << std::endl;
// Parse command line
// Find days
// Run days
}

42
2025/aoc.hpp Normal file
View File

@@ -0,0 +1,42 @@
#pragma once
#include <string>
#include <vector>
#include <filesystem>
struct FileFragment
{
int Line,Col;
std::string Data;
};
class File
{
public:
// loads full file into memory RAII style
// AS BLOB
File(std::filesystem::path path);
~File();
void SplitBy(char delim)
{
}
private:
// Tokens are garunteed to be in-order
std::vector<FileFragment> _tokens;
};
class AOCDay
{
public:
AOCDay();
virtual ~AOCDay() = 0;
virtual int PartOne(const File&) = 0;
virtual int PartTwo(const File&) = 0;
};

0
2025/day1.hpp Normal file
View File