typedef union YYSTYPE {
int64_t iConst; // constant value
float fConst; // constant value
int iAttrLocator; // attribute locator (rowitem for int/float; offset+size for bits)
int iFunc; // function id
int iNode; // node index
} YYSTYPE;
它看起來有效的給我,但CDT報告爲線int64_t iConst;
如下:這裏的代碼段中是否有語法錯誤?
Multiple markers at this line:
- syntax error before "int64_t"
- no semicolon at the end of structure or union
有兩個文件定義int64_t
,一個是項目本身(sphinxstd.h
)內,另一種是與項目無關的包括路徑D:/MinGW/include/stdint.h
,是否是由此衝突造成的?
UPDATE
我選擇上面的代碼,然後通過CTRL - X和CTRL - 小號加CTRL - v和CTRL - 小號 ,問題沒有了!
這裏有任何cdt用戶嗎?
嗯,你在那裏使用了兩次相同的名字'YYSTYPE' - 可能是這個問題? – Cascabel 2010-03-26 00:59:11
在C++中,typedef不是必需的。 – GManNickG 2010-03-26 01:07:39
ctrl + x和ctrl + v之後錯誤消失了,一定是cdt的bug! – Mask 2010-03-26 01:12:06