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 c++ harder than java?

572


What is pointer with example?

564


Describe new operator and delete operator?

630


what are function pointers?

582


What is the real purpose of class – to export data?

618






How many different levels of pointers are there?

657


Define pointers?

611


What is the difference between while and do while loop?

558


What are the new features that iso/ansi c++ has added to original c++ specifications?

588


Describe the advantages of operator overloading?

577


What is the difference between object-oriented programming and procedural programming?

697


What is the v-ptr?

643


What is the difference between set and map in c++?

610


When is the destructor called?

608


What is the difference between the compiler and the preprocessor?

619