Hello,

Hopefully this is a question with a simple answer:

I'd like to have a DX Array of strings (TYPE_STRING). When I use DXGetArrayData(...) to get the array, is the return type char* (pointer to an array)? I'm not finding documentation on this.

My code looks something like:

char* data_array_ptr = (char*)DXGetArrayData(array);
data_array_ptr[index] = str_value.c_str();
// str_value is an object of the C++ STL string class, where the c_str() method returns a null-terminated C-style string.

However, C++ errors out during compilation with the following message:

   invalid conversion from `const char*' to `char'

I have also tried char** in place of "char*", as that makes more sense, given I'm expecting to see an array of arrays. However, that results in a similar compile error too:

   invalid conversion from `const char*' to `char*'

Any ideas? I must be making an incorrect assumption here about what is returned from the DXGetArrayData() function, but I don't see any documentation that helps me figure it out.

Thanks,

Matt
--

Reply via email to