The StringArray class represents arrays of strings (const char *). It encapsulates a pointer to a C array of "const char *" and the size of the array in a single object as follows:
class StringArray
{
public :
int len;
const char * const *data;
StringArray() : data(0), len(0) {}
StringArray(const char * const *data, int len) : data(data), len(len) {}
const char *operator[](int i) const { return data[i]; }
};
Method | Inherited | Description |
StringArray | (Self) | The constructor of the StringArray class. |
© 2023 Advanced Software Engineering Limited. All rights reserved.