LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 05-02-2012, 01:09 PM   #16
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,804

Rep: Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306

would be better to say what can you accept, what do you understand and what is still unclear. Or give us some examples, ask. Maybe there is no "much simple way"
 
Old 05-02-2012, 03:03 PM   #17
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197
Quote:
Originally Posted by Navjot Arora View Post
how reference variable works internally
Internally, it is a pointer. But that is considered an implementation detail, not part of the definition of a reference. There are also lots of syntactic differences and usage rule differences between a reference and a pointer, but all of that is outside of "how it works internally".

Quote:
why array of reference and reference of reference is not possible
Because the C++ standard prohibits those.

There are never simple answers when second guessing the reasons for decisions made by the authors of the C++ standard. Many arbitrary seeming decisions have good reasons once you understand how deeper consequences connect through the whole language design. In this case, the relationship of reference usage rules to template inference makes more complicated references a problem. More fundamentally, a reference to a reference only makes sense based on the implementation detail of using pointers. But that cannot be assumed by the standard.

Quote:
Originally Posted by Navjot Arora View Post
Could anyone please explain much simple way and clearer way?
The simple clear answer is what I put in bold in this restating of what was said earlier.

Last edited by johnsfine; 05-02-2012 at 03:25 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Latex, Hyperlink to a reference and from reference to where it is used roy1360 Linux - Software 2 03-21-2011 01:37 PM
how to set the variales for serial port smartgupta Solaris / OpenSolaris 0 11-21-2008 03:54 AM
for your reference!! alicehuang General 0 01-25-2006 03:30 AM
need some reference Hamid Moradmand Programming 0 05-17-2004 12:46 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 12:31 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration