Skip to content

diniremix/cpp-examples

Repository files navigation

CPP exercises

Simple exercises for learning modern C++ (C++ 20 and above).

Requirements

  • GCC 13.3.x and above
  • vcpkg 2026-05-27 and above
  • Cmake 3.28.x and above
  • Ninja 1.11.x and above

Recommended tools

Getting Started

Clone the repo and make it yours:

$ git clone git@github.com:diniremix/cpp-examples.git
$ cd cpp-examples

Install dependencies

$ vcpkg install

Configure

$ just configure
# cmake --preset debug

Build

$ just build
# cmake --build --preset debug -j

Run exercise

$ just ex EXERCISE_NAME
# cmake --build --preset debug --target EXERCISE_NAME -j
# ./build/debug/EXERCISE_NAME

Tutorials

create a new example:

$ just new EXERCISE_NAME

Then add the following line to cmake/Exercises.cmake:

add_exercise(EXERCISE_NAME)

Finally, run:

$ just ex EXERCISE_NAME

tested on

O.S. compiler
Ubuntu 24.04 (GCC 13.3.0)
Fedora 44 (GCC 16.1.1)
Windows 11 (MSVC 19.44.35226 for x64)

License

CPP examples is licensed under either of the following licenses, at your option:

About

Simple exercises for learning modern C++ [C++ 20 and up](https://isocpp.org/).

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages