overriding vs. overloading

YoungJoon Suh·2023년 8월 11일

overriding: When a derived class wants to print its member variables and the name of the member function in derived class is the same as that of the base class, this is called redefinition or overriding. (sets of parameters in the member functions between base and derived classes are the same.)

overloading: If the corresponding functions in the base class and the derived class have the same name but different sets of parameters, this is function overloading in the derived class, which is also allowed.

profile
저는 서영준 입니다.

0개의 댓글