I want to create a wrapper function template <class foo> op_pk_fd_set_class(packet *packet, int index, foo &value, int simulated_bits); around the following function... (in OPNET) op_pk_fd_set( packet* pkptr, // same as in wrapper int index, // same as in wrapper int some_constant, //OPC_TYPE_STRUCT void* value, int simulated_bits, // same as in wrapper void* (*copy_proc)(void* obj_to_copy,int alloc_size), void (dealloc_proc*)(void *obj), int alloc_size); I believe dealloc_proc can just be a function pointer to the destructor. I could very well be mistaken, but I believe that a normal constructor takes only one parameter. I also think alloc_size should be sizeof(foo). I do not know how to obtain function pointers for constructor and deconstructor member functions. Any assistance I could get would be appreciated.