Home > Back-end >  Need an identifier to declare what do you mean
Need an identifier to declare what do you mean

Time:10-17

Compile time error in the two parts, are prompted the Need an identifier to declare, is a uxtheme h header file inside the code, what reason be excuse me?
The first part:
Typedef enum THEMESIZE
{
TS_MIN,//minimum size
TS_TRUE,//the size without stretching
TS_DRAW,//the size that theme MGR will use to draw part
};

The second part of
Typedef enum PROPERTYORIGIN
{
PO_STATE,//the property was found in the state section
PO_PART,//the property was found in the part section
PO_CLASS,//the property was found in the class section
PO_GLOBAL,//the property was found in [globals] section
PO_NOTFOUND//the property was not found
};

CodePudding user response:

Need an identifier to declare

CodePudding user response:

The first part of the fifth line have a comma at the end, while the second part of the seventh line no, this is obvious contradiction ah

You try this way to the first part:
 typedef enum 
{
TS_MIN,//minimum size
TS_TRUE,//the size without stretching
TS_DRAW//size that theme MGR will use to draw part
} THEMESIZE;

CodePudding user response:

Comma does not affect, it is important to the enumeration name, to:
 typedef enum 
{
TS_MIN,//minimum size
TS_TRUE,//the size without stretching
TS_DRAW,//the size that theme MGR will use to draw part
} THEMESIZE;

Typedef enum
{
PO_STATE,//the property was found in the state section
PO_PART,//the property was found in the part section
PO_CLASS,//the property was found in the class section
PO_GLOBAL,//the property was found in [globals] section
PO_NOTFOUND//the property was not found
} PROPERTYORIGIN;

CodePudding user response:

Pay attention to the enumeration declarations of a generic way,

Typedef enum
{
TS_MIN,//minimum size
TS_TRUE,//the size without stretching
TS_DRAW//size that theme MGR will use to draw part
} THEMESIZE;

Typedef enum
{
PO_STATE,//the property was found in the state section
PO_PART,//the property was found in the part section
PO_CLASS,//the property was found in the class section
PO_GLOBAL,//the property was found in [globals] section
PO_NOTFOUND//the property was not found
} PROPERTYORIGIN;
  • Related