Skip to content

Latest commit

 

History

History
3 lines (2 loc) · 331 Bytes

15.13.md

File metadata and controls

3 lines (2 loc) · 331 Bytes

The derived virtual function print try to call the base version in its function body, but without the scope operator, the call will be resolved at run time as a call to the derived version itself, resulting in an infinite recursion.

To fix this problem, we need to prefix the scope operator to the call like base::print(os);.