lundi 14 décembre 2020

How to use the enum when selecting type of operations

I am trying to create a maths game which has arithmetic operations such as add (+), subtract (-), multiply (*) and divide (/), where the user is able to select which of the one operations out of the four do they want to select. And I want to know how to use an enumeration for the four different type of operations so far I have only included

enum class Operations{
    Add,
    Subtract,
    Multiply,
    Divide,
};

and I now don't know what to add after that.

Aucun commentaire:

Enregistrer un commentaire