a old hand wants to learn C++ again

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dmjpro
    Top Contributor
    • Jan 2007
    • 2476

    a old hand wants to learn C++ again

    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
  • Ganon11
    Recognized Expert Specialist
    • Oct 2006
    • 3651

    #2
    Hey,

    I'm not sure I completely understand your question. Could you possibly rephrase it?

    Comment

    • dmjpro
      Top Contributor
      • Jan 2007
      • 2476

      #3
      can i create array of reference ......?????

      Comment

      • sicarie
        Recognized Expert Specialist
        • Nov 2006
        • 4677

        #4
        Originally posted by dmjpro
        can i create array of reference ......?????
        You want to create an array of pointers? What are you trying to accomplish?

        Comment

        • dmjpro
          Top Contributor
          • Jan 2007
          • 2476

          #5
          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

          Comment

          • Banfa
            Recognized Expert Expert
            • Feb 2006
            • 9067

            #6
            Originally posted by dmjpro
            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.

            Comment

            Working...