mardi 21 juillet 2020

Unexpected with enum class

I'm getting a strange error with enum class declaration. Here is an example:

enum class TESTING

{ ONE, TWO, THREE};

class Testing_User{

...

TESTING t;

};

The compiler shows me on the second line of enum declaration:

error: expected '}' before '('

note: to match this '{'

I don't know what is wrong with this code. I'm using codeblocks 20, gcc 10, Win10

Thanks for your time and support

Aucun commentaire:

Enregistrer un commentaire