編譯的時候在這兩部分出錯,都是提示Need an identifier to declare,是一個uxtheme.h頭檔案里面的代碼,請問是什么原因?
第一部分:
typedef enum THEMESIZE
{
TS_MIN, // minimum size
TS_TRUE, // size without stretching
TS_DRAW, // size that theme mgr will use to draw part
};
第二部分
typedef enum PROPERTYORIGIN
{
PO_STATE, // property was found in the state section
PO_PART, // property was found in the part section
PO_CLASS, // property was found in the class section
PO_GLOBAL, // property was found in [globals] section
PO_NOTFOUND // property was not found
};
uj5u.com熱心網友回復:
需要一個識別符號來宣告
uj5u.com熱心網友回復:
第一部分第五行有逗號結尾,而第二部分第七行則沒有,這是明顯的矛盾呀
你試試這個樣子改第一部分:
typedef enum
{
TS_MIN, // minimum size
TS_TRUE, // size without stretching
TS_DRAW // size that theme mgr will use to draw part
}THEMESIZE;
uj5u.com熱心網友回復:
逗號不影響,重要的是列舉的名字,改成:typedef enum
{
TS_MIN, // minimum size
TS_TRUE, // size without stretching
TS_DRAW, // size that theme mgr will use to draw part
}THEMESIZE;
typedef enum
{
PO_STATE, // property was found in the state section
PO_PART, // property was found in the part section
PO_CLASS, // property was found in the class section
PO_GLOBAL, // property was found in [globals] section
PO_NOTFOUND // property was not found
}PROPERTYORIGIN;
uj5u.com熱心網友回復:
注意一下列舉宣告的一般通用方式就可以了。typedef enum
{
TS_MIN, // minimum size
TS_TRUE, // size without stretching
TS_DRAW // size that theme mgr will use to draw part
}THEMESIZE;
typedef enum
{
PO_STATE, // property was found in the state section
PO_PART, // property was found in the part section
PO_CLASS, // property was found in the class section
PO_GLOBAL, // property was found in [globals] section
PO_NOTFOUND // property was not found
}PROPERTYORIGIN;
轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/133534.html
標籤:基礎類
