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?

Jonathan Eustace
  • 2,469
  • 12
  • 31
  • 54
elite21
  • 757
  • 8
  • 9
  • This looks like a case of [http://stackoverflow.com/questions/3881457/boostpython-howto-call-a-function-that-expects-a-pointer](http://stackoverflow.com/questions/3881457/boostpython-howto-call-a-function-that-expects-a-pointer) – DAmann Mar 23 '16 at 14:23

0 Answers0