1

Can someone please help me in knowing how to extend a class which has a constructor taking required and default arguments and one of the default argument is a void pointer?

eg:

class A
{
    A(int a, int b, void* c=NULL):...
    {
    }
}

class_<A>("A").def(init<int, init, optional</*What should I write for argument c*/>>
;

I got the answer. It should be straight away I have to specify the type of default variable. Thus in this case it should be optional<void*>. But can someone help me in writing Python equivalent code illustrating how to specify pointer argument from Python to C++ using wrapper written above?

1

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.