why we cant create array of refrences

Answer Posted / o saienni

You cannot have a pointer to a reference.
In other words

int &* isn't allowed.

using:

int nArray[3];

The variable nArray is infact a pointer to an array or an
int pointer and the [] will find the offset within that
array. So an array of references will be a pointer to a
reference and this is why it's not allowed.

Is This Answer Correct ?    6 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is there any difference between int [] a and int a [] in c++?

756


What is meant by entry controlled loop? What all C++ loops are exit controlled?

834


Write about the access privileges in c++ and also mention about its default access level?

829


What is fixed in c++?

773


What is the purpose of templates in c++?

773


What is tellg () in c++?

1015


program explaining feautures of c++

2171


What is c++ stringstream?

863


What is a node class in c++?

834


What is meaning of in c++?

920


Explain unexpected() function?

817


What is math h in c++?

837


What is the keyword auto for?

798


What is stl containers in c++?

777


Using a smart pointer can we iterate through a container?

818