I put together this template for solving Advent of Code in C. Nothing fancy, just a solution runner with very basic support for testing, some utils, a script to generate boilerplate, and CMake support.
./new.sh 1 to generate boilerplate for day 1.
cmake --preset debug to configure.
cmake --build --preset debug to build.
cmake --workflow --preset debug to configure and build in one go.
Below is a template you can use for the readme contents.
Solutions for Advent of Code 20XX in C.
| Day | Part | Completed |
|---|---|---|
| Day 1 | Part 1 | ❌ |
| Part 2 | ❌ | |
| Day 2 | Part 1 | ❌ |
| Part 2 | ❌ | |
| Day 3 | Part 1 | ❌ |
| Part 2 | ❌ | |
| Day 4 | Part 1 | ❌ |
| Part 2 | ❌ | |
| Day 5 | Part 1 | ❌ |
| Part 2 | ❌ | |
| Day 6 | Part 1 | ❌ |
| Part 2 | ❌ | |
| Day 7 | Part 1 | ❌ |
| Part 2 | ❌ | |
| Day 8 | Part 1 | ❌ |
| Part 2 | ❌ | |
| Day 9 | Part 1 | ❌ |
| Part 2 | ❌ | |
| Day 10 | Part 1 | ❌ |
| Part 2 | ❌ | |
| Day 11 | Part 1 | ❌ |
| Part 2 | ❌ | |
| Day 12 | Part 1 | ❌ |
| Part 2 | ❌ |