Pointers and References in C++: Working with References

C++    |    Expert
  • 8 videos | 46m 24s
  • Includes Assessment
  • Earns a Badge
Rating 3.7 of 21 users Rating 3.7 of 21 users (21)
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

EARN A DIGITAL BADGE WHEN YOU COMPLETE THIS COURSE

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

Digital badges are yours to keep, forever.

YOU MIGHT ALSO LIKE

Rating 4.5 of 13 users Rating 4.5 of 13 users (13)
Rating 4.7 of 14 users Rating 4.7 of 14 users (14)

PEOPLE WHO VIEWED THIS ALSO VIEWED THESE

Rating 3.6 of 16 users Rating 3.6 of 16 users (16)
Rating 3.9 of 46 users Rating 3.9 of 46 users (46)
Rating 4.3 of 6 users Rating 4.3 of 6 users (6)