Skip to content

Latest commit

 

History

History
22 lines (14 loc) · 500 Bytes

README.md

File metadata and controls

22 lines (14 loc) · 500 Bytes

Chapter 7: Advances in Functions

Default arguments

Function overloading

Function templates

Recursion

Pointer to functions

Lab:

  • implement a function with default arguments.
  • overload a function which can compute the absolute value for an array, the array can be int, float and double

'''C++ vabs(int * p, int n); //should n be int or size_t, what's the difference, please create an arrary with more than 2^31 elements vabs(float * p, int n); vabs(float * p, int n); '''