Suppose I have class in a library whose method i wish to override, but it is not declared virtual

How can I go about overriding the method?

all methods in Java are virtual so, no such problem occurs there

C# provides an explicit new keyword for the same problem

I expect C++ didnt had that feature... but still ready to for a strange answer