A Closer Look at Functions

Chia sẻ: Chankinh1 Chankinh1 | Ngày: | Loại File: PDF | Số trang:33

lượt xem

A Closer Look at Functions

Mô tả tài liệu
  Download Vui lòng tải xuống để xem tài liệu đầy đủ

This module continues our examination of the function. It discusses three of C++’s most important function-related topics: references, function overloading, and default arguments. These features vastly expand the capabilities of a function. A reference is an implicit pointer. Function overloading is the quality that allows one function to be implemented two or more different ways, each performing a separate task. Function overloading is one way that C++ supports polymorphism. Using a default argument, it is possible to specify a value for a parameter that will be automatically used when no corresponding argument is specified. We will begin with an explanation...

Chủ đề:

Nội dung Text: A Closer Look at Functions

Đồng bộ tài khoản