Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/thejan14/adventofcode2023
Advent of Code 2023
https://github.com/thejan14/adventofcode2023
advent-of-code advent-of-code-2023 advent-of-code-2023-cpp aoc aoc2023 aoc2023-in-cpp
Last synced: 7 days ago
JSON representation
Advent of Code 2023
- Host: GitHub
- URL: https://github.com/thejan14/adventofcode2023
- Owner: thejan14
- Created: 2023-12-01T13:06:15.000Z (7 months ago)
- Default Branch: master
- Last Pushed: 2023-12-21T12:40:14.000Z (7 months ago)
- Last Synced: 2024-03-11T08:34:00.508Z (4 months ago)
- Topics: advent-of-code, advent-of-code-2023, advent-of-code-2023-cpp, aoc, aoc2023, aoc2023-in-cpp
- Language: C++
- Homepage: https://adventofcode.com/
- Size: 263 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Lists
- awesome-advent-of-code - thejan14/adventofcode2023 - 2023--12--21-brightgreen) (2023 / Solutions)
README
![visitors](https://visitor-badge.laobi.icu/badge?page_id=thejan14.adventofcode2023)
# Advent of Code 2023
Welcome to my [Advent of Code](https://adventofcode.com/2023) 2023 contribution! The solutions are written in C++23 using CMake, Ninja and the MSVC compiler on Windows. When writing the solutions code I primarily aim for readability but try to always keep performance considerations in mind (thought the latter strongly depends on how much time I can spend). Happy reading!
## What is Advent of Code?
Advent of code is made by [Eric Wastl](https://github.com/topaz).> [It is] an Advent calendar of small programming puzzles for a variety of skill sets and skill levels that can be solved in any programming language you like. People use them as a speed contest, interview prep, company training, university coursework, practice problems, or to challenge each other.
For more information see [about Advent of Code](https://adventofcode.com/2023/about).
## Running the solutions
For running the code you need [Visual Studio 2022](https://visualstudio.microsoft.com/de/downloads/) with the [Desktop development with C++](https://learn.microsoft.com/en-us/cpp/build/vscpp-step-0-installation?view=msvc-170) workload installed. Open the repository folder in Visual Studio and navigate to the "CMake Targets View" in the Solution explorer:![grafik](https://github.com/thejan14/adventofcode2023/assets/7323693/49320c70-f2d1-45e0-bc46-f521e04c6167)
Right click the target you want to run and choose "Debug":
![Screenshot 2023-12-02 132742](https://github.com/thejan14/adventofcode2023/assets/7323693/e78ab986-b5ef-4298-82d4-9985355949a4)
You can also compile and run the code on Linux. Make sure you have the latest version of [CMake](https://cmake.org/) and [gcc](https://gcc.gnu.org/) installed (tested with CMake 3.27.7 and gcc 13.1.0). Note that gcc must be installed to `/usr/bin/gcc`. Then run the following command in the repository folder:
```
cmake -B./out/build --preset="x64-debug-linux" .
```This will prepare your build files. To build the C++ code run:
```
cmake --build ".\out\build"
```Now you can run the solutions by navigating to the respective build folder:
```
(cd ./out/build/dayXX/ && ./dayXXpartY)
```