exercism / cpp

Exercism exercises in C++.
https://exercism.org/tracks/cpp
MIT License
254 stars 207 forks source link

[Concept] Exercise - Switch and Enum #694

Closed vaeng closed 1 year ago

vaeng commented 1 year ago

This was planned to be the C# Enum exercise, but it was not quite fitting for C++.

This, new exercise, should cover switches and enums and even make it possible to make static_cast<int> comparison.

It is all new docs, so please keep an extra eye open for grammar, style, and content clarity while proofreading.

vaeng commented 1 year ago

@siebenschlaefer:

Do you plan to include casting from/to integers?

The comparison task is set explicitly to open that path. I am not sure if the text in the about section of the enums concept is enough (and something in the hints) or if I should make it more explicit in the concept files.

Also, I should probably make an example with enums in switches, because that is really helpful here. But I am not sure where a good place for the combination would take place.

vaeng commented 1 year ago

@siebenschlaefer I added the rest of the files. What do you think of the exemplar?