I have this big problem with using enumerators in a class function
I get this error from EclipseCode:class Automat { public: void print(); int AddCoins(enum Coins, int MoreCoins); private: typedef enum {One=1, Two, Three} Coins; int MoreCoins; --snip-- Automat::AddCoins(Automat::Coins, int MoreCoins) { if (Coins == ONE) CoinStack += MoreCoins; } etc...
I have tried moving it around to public: and outside the class entirely.Code:error: 'enum Automat::Coins' is private
I also get an error on the function:
can someone point me in the right direction, as I am a bit lost on the syntax, as to why it doesn't accept my enums as parameters to a functionCode:error: 'Automat::AddCoins(int, int)' error: expected identifier before ',' token error: C++ forbids declaration of 'AddCoins' with no type



LinkBack URL
About LinkBacks




CornedBee