0

Can u plz explain me the concept of overiding and virtual functions?

13th Sep 2017, 3:23 AM
Rishi Raj Roy
Rishi Raj Roy - avatar
5 Answers
+ 4
overriding is defining a function in a base class then another function with the same name and parameters in a separate class derriving from the base virtual functions call the function from it's child class(the one that derives from it), if this does not exist, it will call the base class function pure virtual functions require any class deriving from it to have that function, if not you get an error and because of this, you don't need to actually put any logic in your function of the base class
13th Sep 2017, 3:55 AM
Jordan Chapman
Jordan Chapman - avatar
+ 3
ahh, my bad. I just updated
13th Sep 2017, 4:00 AM
Jordan Chapman
Jordan Chapman - avatar
+ 1
thanks Michelle
13th Sep 2017, 3:55 AM
Rishi Raj Roy
Rishi Raj Roy - avatar
0
@Jordan Chapman that is the overloading concept!
13th Sep 2017, 3:56 AM
Rishi Raj Roy
Rishi Raj Roy - avatar