Pointers and References in C++: Working with References

C++ 20    |    Expert
  • 8 Videos | 46m 24s
  • Includes Assessment
  • Earns a Badge
C++ supports a variable type known as the reference. You can think of references as being easier-to-use, lighter-weight versions of pointers. Begin by getting familiar with the syntax and semantics of references in C++, including the use of the & symbol to denote a reference type. Note some important differences between references and pointers, how references need to be assigned when they are created, how they cannot be reassigned or set to NULL, and how multiple references to the same underlying value are all effectively aliases for that value. Move on to declaring and using variables of reference type. Finally, learn about const references and experiment with different configurations of loops, where the loop variables are references, value types, and const references. Upon course completion, you'll be able to define and initialize variables of reference types, contrast pointers and references, and correctly use const references.

WHAT YOU WILL LEARN

  • discover the key concepts covered in this course
    contrast references with pointers
    create references and modify the variables being referred to
    create references on different types and objects
  • create references and modify variables through them
    create and use const references
    use the const_cast operator
    summarize the key concepts covered in this course

IN THIS COURSE

  • Playable
    1. 
    Course Overview
    1m 39s
    UP NEXT
  • Playable
    2. 
    Introduction to References
    5m 11s
  • Locked
    3. 
    Creating References
    7m 23s
  • Locked
    4. 
    Referencing Different Objects
    7m 38s
  • Locked
    5. 
    Modifying Data Using References
    6m 8s
  • Locked
    6. 
    Creating Constant References
    7m 22s
  • Locked
    7. 
    Casting Variables to Be Constant
    7m 55s
  • Locked
    8. 
    Course Summary
    3m 9s

EARN A DIGITAL BADGE WHEN YOU COMPLETE THIS COURSE

Skillsoft is providing you the opportunity to earn a digital badge upon successful completion of this course, which can be shared on any social network or business platform

Digital badges are yours to keep, forever.