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 do you mean by global variables?

672


Can I uninstall microsoft c++ redistributable?

687


What is a tree in c++?

637


Using a smart pointer can we iterate through a container?

662


Can manipulators fall in love?

650






What are smart pointers?

778


What is vector processing?

767


How can you prevent accessing of the private parts of my class by other programmers (violating encapsulation)?

738


Can we define a constructor as virtual in c++?

689


What are the characteristics of friend functions?

650


What is #include iostream?

854


what are the characteristics of Class Members in C++?

697


What does return 0 do in c++?

690


What is binary search in c++?

684


Does there exist any other function which can be used to convert an integer or a float to a string?

731