1. Home
  2. Computing & Technology
  3. C / C++ / C#

Definition of Reference

By , About.com Guide

Definition: In C++, a reference is a restricted type of pointer. It can only be assigned once and can never have a NULL value.

References are most useful when used to indicate that a parameter to a function is being Passed by Reference where the address of the variable is passed in. Without a Reference, Pass By Value is used instead.

Glossary:

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Examples:
Passing a large array by value into a function is slow and can possibly exhaust the stack possibly causing a crash. Pass by Reference should be used instead.
Explore C / C++ / C#
About.com Special Features

Holiday Central

What to eat, where to go, fun things to do and how to save money on the perfect gifts. More >

Family Tech Center

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

  1. Home
  2. Computing & Technology
  3. C / C++ / C#
  4. Glossary
  5. Reference - Definition

©2009 About.com, a part of The New York Times Company.

All rights reserved.