I am using an enum to declare types of variables. However, I get an error on each string saying: Error: expression must be an integral constant expression
. And if I change the ""
to ''
, the words which are five characters or over give the error: Error: too many characters in a character constant
. What should I do?
typedef enum
{
INT = "int",
STRING = "string",
BOOLEAN = "bool",
CHARACTER = "char",
DOUBLE = "double",
FLOAT = "float",
LONG = "long",
SHORT = "short"
} variable_types;