作者LPH66 ((short)(-15074))
看板Programming
标题Re: [问题] 请问C语言中的int&*
时间Thu Sep 18 02:17:16 2008
※ 引述《[email protected] (嘎明)》之铭言:
: 前几天上课时教授提到
: C语言中的int&*是不存在的
: 到现在还是不太了解
: 请问有大神可以帮我解答吗
: 感谢 m(_ _)m
我们来比较一下存在的int*&和不存在的int&*
读法是由右边读回来
int*& => a reference of a pointer (pointed) to an int
'int的指标'的参照
int&* => a pointer (pointed) to a reference of an int
指向'int参照'的指标
这样看就知道了 '指向参照的指标'这是啥东西? 所以没有这种东西
而指标的参照则是有意义的
--
'You've sort of made up for it tonight,' said Harry. 'Getting the
sword. Finishing the Horcrux. Saving my life.'
'That makes me sound a lot cooler then I was,' Ron mumbled.
'Stuff like that always sounds cooler then it really was,' said
Harry. 'I've been trying to tell you that for years.'
-- Harry Potter and the Deathly Hollows, P.308
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 140.112.30.84
1F:→ WPC001:C里头没有reference吧... 应该是C++ 123.195.37.60 09/18 22:26
2F:→ shelling:c 和 c++ 的 指标 参照 语法一样阿 118.169.33.19 11/29 15:54
3F:→ shelling:怎麽会没有呢... 118.169.33.19 11/29 15:54