Tuesday, April 26, 2011

virtual keyword

If you want to declare a different behavior for a method in your derived class - compared to a method declared in the base class, you should use the virtual keyword. This way, you are allowed to adapt your derived class to specific conditions that requires changes in the base methods. Yeah, use virtual, ok? (So you gave the impression that you know everything about the class declarations in C++. I don't buy it alright!  -C'mon, I know that stuff ok - virtual is important :s)

No comments:

Post a Comment