作者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/cn.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