Redefining, Reloading and Overloading? | Sololearn: Learn to code for FREE!
Neuer Kurs! Jeder Programmierer sollte generative KI lernen!
Kostenlose Lektion ausprobieren
0

Redefining, Reloading and Overloading?

What is the fundamental difference between redefining, reloading and overloading? When do they happen?

21st May 2020, 9:48 PM
TSERING LOWA
TSERING LOWA - avatar
1 Antwort
+ 1
Redefining - Static methods would be a very good example. Since they belong to the class and not to particular instance, you cannot override them in the child class. When you do override, it would be called REDEFINING the method because now you just create a static method with the same name as that of you base class. Reloading - http://www.codinglabs.net/tutorial_CppRuntimeCodeReload.aspx Overloading - When methods within a class have same name but have different return type and either vary in number or type of parameters passed.
21st May 2020, 10:04 PM
Avinesh
Avinesh - avatar