Functions in C++: Using Default Arguments & Function Overloading

C++ 20    |    Intermediate
  • 8 Videos | 56m 35s
  • Includes Assessment
  • Earns a Badge
C++ allows you as the developer to specify default values for the input arguments into your functions, and supports function overloading. Both of these are powerful techniques for code reuse. Explore how to use default argument values for C++ functions, including important rules that govern such default values. Examine the semantics of return values from functions and learn how to avoid the dangling pointer problem. Discover function overloading, learn how to split the declaration and implementation of a function across header and implementation files, and learn the correct way of importing these header files into code to invoke that function. Upon completion, you'll be able to specify default values for function arguments, overload functions based on input arguments and const, and split functions across .h and .cpp files.

WHAT YOU WILL LEARN

  • discover the key concepts covered in this course
    pass in input arguments with default values
    explore how to return pointers and references from functions
    use the auto keyword with return values of a function
  • create multiple functions with the same name
    work with overloading functions
    split code into header files
    summarize the key concepts covered in this course

IN THIS COURSE

  • Playable
    1. 
    Course Overview
    2m 45s
    UP NEXT
  • Playable
    2. 
    Using Default Arguments
    10m 48s
  • Locked
    3. 
    Returning Pointers and References
    8m 52s
  • Locked
    4. 
    Using the auto Keyword
    8m 18s
  • Locked
    5. 
    Overloading Functions
    6m 50s
  • Locked
    6. 
    Exploring the Nuances of Overloading Functions
    8m 3s
  • Locked
    7. 
    Creating Header Files
    7m 27s
  • Locked
    8. 
    Course Summary
    3m 34s

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.