Functions in C++: Using Default Arguments & Function Overloading
Shreyanshu Kunwar
Skillsoft issued completion badges are earned based on viewing the percentage required or receiving a passing score when assessment is required. 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.
Issued on
March 12, 2025
Expires on
Does not expire