Proceedings of the 2014 International Conference on Mechatronics, Electronic, Industrial and Control Engineering

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

Authors
Jingqin Mu, Xiaohui Li, Haiyang Jiang, Jun Zhang, Ruiqing Du
Corresponding Author
Jingqin Mu
Available Online November 2014.
DOI
10.2991/meic-14.2014.20How to use a DOI?
Keywords
references; returning references; memory space; C++ programming language; function
Abstract

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.

Copyright
© 2014, the Authors. Published by Atlantis Press.
Open Access
This is an open access article distributed under the CC BY-NC license (http://creativecommons.org/licenses/by-nc/4.0/).

Download article (PDF)

Volume Title
Proceedings of the 2014 International Conference on Mechatronics, Electronic, Industrial and Control Engineering
Series
Advances in Engineering Research
Publication Date
November 2014
ISBN
978-94-62520-42-4
ISSN
2352-5401
DOI
10.2991/meic-14.2014.20How to use a DOI?
Copyright
© 2014, the Authors. Published by Atlantis Press.
Open Access
This is an open access article distributed under the CC BY-NC license (http://creativecommons.org/licenses/by-nc/4.0/).

Cite this article

TY  - CONF
AU  - Jingqin Mu
AU  - Xiaohui Li
AU  - Haiyang Jiang
AU  - Jun Zhang
AU  - Ruiqing Du
PY  - 2014/11
DA  - 2014/11
TI  - Discussions on References and Returning References in C++ Programming Language
BT  - Proceedings of the 2014 International Conference on Mechatronics, Electronic, Industrial and Control Engineering
PB  - Atlantis Press
SP  - 87
EP  - 91
SN  - 2352-5401
UR  - https://doi.org/10.2991/meic-14.2014.20
DO  - 10.2991/meic-14.2014.20
ID  - Mu2014/11
ER  -