This repository contains my solutions for Advent of Code 2024, implemented in C++. As someone with experience in C and Python, I am using AoC as a hands-on way to improve my C++ skills while solving fun and challenging problems.
📖 Blogs:
Before running the solutions, you need to download the input files for each day. There are two ways to organize them:
Place each input file in its corresponding day's folder as shown below. The CMake script will automatically copy them to the build/ directory when you build the project.
|-- Day01_Historian_Hysteria
| `-- input.txt
|-- Day02_Red-Nosed_Reports
| `-- input.txt
|-- Day03_Mull_It_Over
| `-- input.txt
| .
| .
| .
|-- DayN_XXX_XXX
| `-- input.txt
A warning will be shown if now corresponding input file is found.
Alternatively, you can place all input files directly inside the build/
directory with the naming format:
build/input1.txt
build/input2.txt
build/input3.txt
.
.
.
build/inputN.txt
git clone https://github.com/ABD-01/AoC2024.git
cd AoC2024
mkdir build
cd build
cmake ..
make
-
Run all solutions
make run
-
Run a specific day's solution (e.g., Day 2)
make run2
Each day's executable will automatically read the input file (input{day}.txt) from the build/ directory, where CMake has placed it during the build process.
If you'd like to contribute, feel free to suggest improvements, alternative solutions or criticism via issues or pull requests.
This project is open-source and available under the MIT License.