Search code examples
c++gsoap

gsoap allocate simple type


gsoap generates the functions to allocate the complex types which look like the following: soap_new_set_ns1__Date

I can't find how to do the same for just an integer. Integer is optional and therefore has to be allocated in the similar manner.

Thank You.


Solution

  • You can use soap_malloc():

    int* pi = (int*)soap_malloc(soap, sizeof(int));