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

What is the difference between new() and malloc()?

614


What sorting algorithm does c++ use?

594


an integer constant must have atleast one a) character b) digit c) decimal point

552


What are the rules about using an underscore in a c++ identifier?

629


What is the best c++ compiler?

589






Keyword mean in declaration?

591


What are pointer-to-members? Explain.

622


Write about the retrieval of n number of objects during the process of delete[]p?

567


Ask to write virtual base class code?

2147


Write about the use of the virtual destructor?

602


Explain some examples of operator overloading?

641


what is data abstraction in C++?

642


What is the difference between an enumeration and a set of pre-processor # defines?

824


What return value must conversion operators have in their declaration?

610


How can an improvement in the quality of software be done by try/catch/throw?

586