国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 學(xué)院 > 開發(fā)設(shè)計(jì) > 正文

References and arrays

2019-11-17 05:39:02
字體:
供稿:網(wǎng)友

  PROBLEM: ajackson@keck.tamu.edu (Andrew J. Jackson)

I'm inquiring on how to declare a reference to an array of integers


RESPONS: Efim Birger (efim@microware.com)

try this:

typedef int *intp;
int arr[10];
intp& aaa = arr;


RESPONSE: fjh@munta.cs.mu.OZ.AU (Fergus Henderson), 11 Aug 94

This code is illegal. `aaa' is a (non-const) reference to a pointer to int.
`arr' is an array of int, which will be converted to a pointer to int.
The result of that conversion is a temporary.
You are initializing a non-const reference with a temporary, which is illegal.


RESPONSE: admin@rzaix13.uni-hamburg.de (Bernd Eggink)

There is no sUCh thing as a reference to an array.


RESPONSE: fjh@munta.cs.mu.OZ.AU (Fergus Henderson)

There most certainly is.
(An array of references is illegal, but a reference to an array is quite OK.)

發(fā)表評論 共有條評論
用戶名: 密碼:
驗(yàn)證碼: 匿名發(fā)表
主站蜘蛛池模板: 镇原县| 广德县| 墨玉县| 遵化市| 巍山| 嘉定区| 德安县| 佳木斯市| 华安县| 双城市| 平塘县| 吉林市| 峡江县| 鄂伦春自治旗| 牡丹江市| 马尔康县| 巴南区| 栾城县| 垦利县| 富顺县| 云梦县| 盐津县| 惠州市| 德庆县| 封丘县| 安丘市| 白沙| 奉节县| 卢湾区| 永胜县| 牙克石市| 辽中县| 静海县| 盐亭县| 山阳县| 金寨县| 东阿县| 阳曲县| 阜平县| 海林市| 绍兴县|