Discussions on References and Returning References in C++ Programming Language

2014 
References are widely used in C++ programming language. A reference is a value that enables a program to indirectly access a particular data item in the computer's memory or in some other storage device. References are difficult for programmers to understand and to master. The purpose of this paper is to illustrate the common knowledge of references and returning references, and discuss how to understand them soundly and use them properly. One way to this problem is to regard these references as some certain aliases. Several examples, such as stand-along reference and returning reference, are presented to discuss the use of references and their "aliases", and a typical example is presented to illustrate how to analyze programs about the special returning reference with "aliases". At the end of this paper, a conclusion is made based on the above discussions that one of the ways mastering references and returning references is to regard them as aliases for variables, objects, and functions.
    • Correction
    • Source
    • Cite
    • Save
    • Machine Reading By IdeaReader
    11
    References
    0
    Citations
    NaN
    KQI
    []