All Projects → exercism → Cpp

exercism / Cpp

Licence: mit
Exercism exercises in C++.

Projects that are alternatives of or similar to Cpp

Haskell
Exercism exercises in Haskell.
Stars: ✭ 351 (+125%)
Mutual labels:  exercism-track
Python
Exercism exercises in Python.
Stars: ✭ 922 (+491.03%)
Mutual labels:  exercism-track
Scala
Exercism exercises in Scala.
Stars: ✭ 88 (-43.59%)
Mutual labels:  exercism-track
Java
Exercism exercises in Java.
Stars: ✭ 393 (+151.92%)
Mutual labels:  exercism-track
Lfe
Exercism exercises in Lisp Flavoured Erlang (LFE).
Stars: ✭ 17 (-89.1%)
Mutual labels:  exercism-track
Idris
Exercism exercises in Idris.
Stars: ✭ 25 (-83.97%)
Mutual labels:  exercism-track
perl5
Exercism exercises in Perl 5.
Stars: ✭ 25 (-83.97%)
Mutual labels:  exercism-track
Erlang
Exercism exercises in Erlang.
Stars: ✭ 105 (-32.69%)
Mutual labels:  exercism-track
Prolog
Exercism exercises in Prolog.
Stars: ✭ 18 (-88.46%)
Mutual labels:  exercism-track
Fsharp
Exercism exercises in F#.
Stars: ✭ 77 (-50.64%)
Mutual labels:  exercism-track
Elixir
Exercism exercises in Elixir.
Stars: ✭ 400 (+156.41%)
Mutual labels:  exercism-track
Rust
Exercism exercises in Rust.
Stars: ✭ 651 (+317.31%)
Mutual labels:  exercism-track
Coffeescript
Exercism exercises in CoffeeScript.
Stars: ✭ 11 (-92.95%)
Mutual labels:  exercism-track
Ruby
Exercism exercises in Ruby.
Stars: ✭ 381 (+144.23%)
Mutual labels:  exercism-track
Elm
Exercism exercises in Elm.
Stars: ✭ 100 (-35.9%)
Mutual labels:  exercism-track
pharo-smalltalk
exercism.org/tracks/pharo-smalltalk
Stars: ✭ 24 (-84.62%)
Mutual labels:  exercism-track
Delphi
Exercism exercises in Delphi Pascal.
Stars: ✭ 24 (-84.62%)
Mutual labels:  exercism-track
Kotlin
Exercism exercises in Kotlin.
Stars: ✭ 128 (-17.95%)
Mutual labels:  exercism-track
Php
Exercism exercises in PHP.
Stars: ✭ 100 (-35.9%)
Mutual labels:  exercism-track
Bash
Exercism exercises in Bash.
Stars: ✭ 74 (-52.56%)
Mutual labels:  exercism-track

C++

Exercism Exercises in C++

Contributing Guide

Please see the contributing guide

The most useful way to start contributing to this track is to review Pull Requests and/or some of the open track issues. There are not many active contributors, so anyone reviewing PRs or Issues, even just to +1 someone elses opinion, is appreciated.

Adding an exercise

Here is a list of things that need to be done to add an exercise to this track.

  1. Add the exercise under the exercises/ directory.
  2. Create your test suite based on the canonical tests in the problem specifications repo, and add a comment at the top of the test suite noting the version of the test suite it implements.
  3. Create an example solution and name the files example.cpp and example.h. example.cpp is optional but encouraged.
  4. Add the test to the list in the root CMakeLists.txt file.
  5. Add the test to the config.json file. The configlet can help generate a unique UUID. You can download configlet using the script in bin/fetch-configlet.
  6. Add at least one topic for the exercise in the config.json file. Check the available topics in TOPICS.txt.
  7. Use the configlet tool to generate the README for your exercise.
  8. Try to match the formatting used in the other tests as closely as possible.

Testing an exercise

The Exercism build system has two unusual constraints. First, example solutions must be named example.h and example.cpp; this prevents Exercism from sending these files to the student. Second, student solutions must be named <exercise>.h and <exercise>.cpp, for example anagram.h and anagram.cpp.

The current CMake build system navigates this with an unusual approach: it copies all example solutions from the exercises/ tree to an alternate directory (which is ignored by git), renames the solutions as if they were student exercises, and runs a complete build in this new directory.

Maintainers can largely ignore the alternate exercise directory if they recopy their example solution before running a build. Re-running CMake will recopy all exercise files.

For example, a maintainer can copy, configure, compile, and test all exercises by running the following from the root directory:

cmake . && make

For an individual exercise, in this example anagram, the maintainer should edit:

exercises/anagram/example.h
exercises/anagram/example.cpp
exercises/anagram/anagram_test.cpp

Then copy, configure, compile, and test with:

cmake . && make test_anagram
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].