tags:

views:

63

answers:

2

Can somebody please let me know, what does contingency code mean...??\

I read it in c++ complete ref, and it related it with virtual functions, that due to late binding, since calls to virtual functions are resolved at run-time, we dont have to write a lot of "contingency code". But it did not explain what contingency code meant.

+1  A: 

Ìn this context, a fancier word for 'code with a lot of if and switch statements', which imperative non-OO code often seems prone to. See contingency.

Pontus Gagge
A: 

Contingency means "A provision for such an event or circumstance" according to Google. I think he's referring to the fact that derived classes do not have to implement all of the virtual interface of the base class, if there is a definition for the function in the base class (ie, the function is not pure virtual).

This would reduce the amount of "function provision for such objects."

That's my best guess.

sheepsimulator