By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,421 Members | 1,089 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,421 IT Pros & Developers. It's quick & easy.

a old hand wants to learn C++ again

dmjpro
100+
P: 2,476
i totally detached from c++ for 1.2 year ... but right now i want to learn again it

yeasterday i learnt that in C++ the array of reference is not possible ... why this is not possible ... plz explain me logically .....

any help is most welcome......

thanxxxx
Mar 15 '07 #1
Share this Question
Share on Google+
5 Replies


Ganon11
Expert 2.5K+
P: 3,652
Hey,

I'm not sure I completely understand your question. Could you possibly rephrase it?
Mar 15 '07 #2

dmjpro
100+
P: 2,476
can i create array of reference ......?????
Mar 15 '07 #3

sicarie
Expert Mod 2.5K+
P: 4,677
can i create array of reference ......?????
You want to create an array of pointers? What are you trying to accomplish?
Mar 15 '07 #4

dmjpro
100+
P: 2,476
soorryyy .... i think u know two terms reference and pointers in C++ the array of pointers is possible .... but array of references is not ......

i want to know why ??????

thanxxxx in advance
Mar 15 '07 #5

Banfa
Expert Mod 5K+
P: 8,916
the array of pointers is possible .... but array of references is not ......

i want to know why ??????
Because the standard says so.

Actually why would you need an array of references? You have to initialise a reference on creation and once initialised it can not be changed to reference a different object. I suspect that an array of references would be a construct that would not be terribly useful while at the same time introducing a number of awkward problems for the compiler to get round and so was prohibited by the standard.
Mar 15 '07 #6

Post your reply

Sign in to post your reply or Sign up for a free account.