作者KanzakiHAria (神崎・H・アリア)
看板C_and_CPP
標題[閒聊] C syntax proposal int * a,b
時間Tue Apr 5 12:00:06 2022
原文
https://twitter.com/typeswitch/status/1510994241631227907
int* a, b; // both a and b are pointers
int *a, b; // a is a pointer, but b isn't
int * a, b; // a is a pointer, whether b is a pointer is implementation-defined
這個還算好笑
歷史愚人節笑話回顧
C++ deprecating raw pointer
https://www.cppstories.com/2018/04/deprecating-pointers/
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 36.231.60.117 (臺灣)
※ 文章網址: https://webptt.com/m.aspx?n=bbs/C_and_CPP/M.1649131210.A.969.html
1F:推 Dracarys: 那int *a, b(void);的b是function declaration還是poin 04/05 13:18
2F:→ Dracarys: ter? 04/05 13:18
3F:→ Dracarys: 打錯 我想說的是int* a, b(void); 04/05 13:19
4F:推 CoNsTaR: 樓上沒看內文齁 抓到 XD 04/05 13:46
5F:推 Dracarys: 如果b是function pointer那是回傳int還是int*啊 04/05 18:08
6F:→ testPtt: 只好打int*a,b了 04/06 11:19
8F:→ ck574b027: 最好笑的肯定是這個,雖然不是愚人節 04/06 14:54
9F:→ Lipraxde: 真的好笑XDD 04/06 15:03
10F:→ peter98: 純粹好奇 如果打int* a, *b; b是pointer還是pointer 04/07 03:08
11F:→ peter98: to pointer XD 04/07 03:08
12F:→ peter98: 我習慣是寫int *a, *b; 保證沒問題 04/07 03:09
13F:推 CoNsTaR: 我已經分不清楚誰是在反串誰是真的在問問題了 04/07 03:27
14F:推 sarafciel: ck那篇也太歡樂XDD 以後就叫arrow operator好了(X 04/07 13:31
15F:→ Dracarys: 這比較有料 04/10 01:58
17F:→ diabolica: 感謝樓上 04/11 23:27