I need call a method with this signature in my Manager class:
void createPlayer(Player& player, PlayerType& playerType);
I have a P
enum
doesn´t create a namespace.
Therefor PlayerType t = PlayerType::FORWARD;
should be changed to:
PlayerType t = FORWARD;
Notice that c++11 introduce enum class
es, which have a namespace. Beside this MSVC has an extension which treats (regular) enums like they have namespace. So your code should actually work with MSVC.