In my class I defined an enum like this:
class myClass { public: enum access { forL, forM, forA }; typedef access AccessType;
Enumeration members are backed by integer values but there is no implicit conversion from an integer to an enum type. You need to use an explicit cast if you really want to write it like this:
ob->aType = static_cast(0);