My code works, altough I have a feeling that it could be improved, especially my enum which is currently inside the main()
function.
I've tried placing my enum outside of the int main
function, it still works, I personally think it wouldn't be very presentable.
int main()
{
enum element {
ICE, FIRE, EARTH, WIND, NONE
};
..The rest of the code..
return 0;
}
Any tips would be much appreciated.
reference to C++ How to translate my code to OOP with classes and functions?
Outside. You will want to use this enum for a class, the class may be defined someplace else, requiring the enum. So it should be outside.
Also, maybe better to use an enum class in modern C++.