Original Post
I know that this is possible, and I can do this. What I'd like to know is whether C++ will call the Python derived class's function if you call a virtual function in C++? Here's my example: Then let's say that I've got: Base* ptr = SomeFactoryFunction(); //<- returns an instance of Derived() ptr->Run() Would that call Base::Run() or Derived::Run()? Thanks in advanced.
//C++
class Base
{
virtual void Run()
{
std::cout << "Base class.";
}
}
//Python, assuming that I've got the C++ class 'into Python' with boost::Python already
class Derived(Base):
Run():
print "Derived."