Skip to content

C++ library containing solutions to the Advent of Code 2024 challenge

Notifications You must be signed in to change notification settings

artemis-beta/Advent-of-Code-2024

Repository files navigation

Advent of Code 2024

Advent of Code 2024

This repository contains solutions to the challenges set as part of the Advent of Code 2024. The solutions have been created in the C++ programming language as a library.

1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25

The code is written as an AdventOfCode24 library which is built using CMake, the code of which is found in src/ with headers present in include/. Solutions to the problems then use this library and are found in solutions/. The project is carried out using test driven development using the examples for each problem to create tests built using GTest and found in tests/.

Building

Firstly clone this repository ensuring all sub-modules are cloned also:

git clone --recurse-submodules https://github.com/artemis-beta/Advent-of-Code-2024.git

You will need CMake, note also that the project assumes C++23 is available:

cmake -Bbuild [-DAOC24_BUILD_TESTS=ON] [-DAOC24_BUILD_SOLUTIONS=ON]
cmake --build build

Execute

Run the tests using the GTest executable:

./build/tests/AdventOfCode24_Test

Run the solutions from the relevant executable pointing to the applicable data file:

./build/solutions/day_1 ./solutions/data/day_1.txt

About

C++ library containing solutions to the Advent of Code 2024 challenge

Topics

Resources

Stars

Watchers

Forks