I have character array like
char *a[]={"hi","hello","how are you"};
I want to convert it into CStringArray
How can I do this?
char *a[] = { "hi","hello","how are you" };
CStringArray array;
for (int i = 0; i < sizeof(a) / sizeof(a[0]); i++)
{
array.Add(a[i]);
}
sizeof(a) / sizeof(a[0]) is the number of string literals in the a array, that is 3.
const char* const a[] ....
const char *a[]