read string array


I would like to read array data from my HDF files. I use C++ code for reading the array dimension, for matrix and vector data (double / float) everything works fine, also a native string. I have created a hdf string array with Matlab and try to read it with C++:

       H5::DataSet l_dataset = m_file.openDataSet( p_path.c_str() );
         H5::DataSpace l_dataspace = l_dataset.getSpace();

         if (l_dataspace.getSimpleExtentNdims() != 1)
             throw exception
         if (!l_dataspace.isSimple())
             throw exception

         hsize_t l_size[1];
         l_dataspace.getSimpleExtentDims( l_size );

         char l_data[l_size[0]]; l_data, l_dataset.getDataType() );

l_size[0] holds the number of items of my string array, but how can I read now the data? I take a look to the "creating/reading variable length string dataset C++" excample, but this code doesn't work. I'll get a segmentation fault on the option, that I change the char* zu char. In the l_data variable I see some items of the first array element.

Can anyone explain me how I read the data in the correct way?