Re: [問題] 一個 typedef 語法
: 推 descent:int(i); 這種語法還真難倒我 12/12 18:46
: 推 descent:那這樣也是正確的嗎? int(i)=5; compile 會過 i=5 12/12 18:48
: 推 jackace:是正確的 n3485 section 8.3 rule 6 12/12 19:59
: → jackace:事實上函式指標的宣告 int (*f)()也是這個rule 透過()將 12/12 20:03
: → jackace:specifier跟declarator分開 12/12 20:03
請問是這段嗎?
In a declaration T D where D has the form
( D1 )
the type of the contained declarator-id is the same as that of the contained
declarator-id in the declaration
T D1
Parentheses do not alter the type of the embedded declarator-id, but they can
alter the binding of complex
declarators.
所以使用了 int(i) 有著和空白一樣的效果 int i 是嗎?
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 58.114.140.46
討論串 (同標題文章)