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

Difference between declaration and definition of a variable.

910


What is a friend function in c++?

1048


What is the use of map in c++?

892


Can the creation of operator** is allowed to perform the to-the-power-of operations?

781


Write a c program for binary addition of two 8 bit numbers.

3893


What is the difference between an external iterator and an internal iterator? Describe an advantage of an external iterator?

858


What is purpose of new operator?

825


What is object in c++ example?

856


What is a storage class? Mention the storage classes in c++.

795


What are structures and unions?

797


What is a stack c++?

778


What is a buffer c++?

791


What is else syntax in c++?

872


What does it mean to declare a member function as static?

839


What is #include cstdlib in c++?

914