You should be able to compile that. And then it should break, since values in charArray are not initialized. If you want to use c libraries, do charArray[0] = malloc(strlen("wn")+1); strcpy(charArray[0], "wn"); and so on. But if you can, use std::string. That would make things easier.
First that is a bad idea since there is no memory allocated for the destination. charArray hasn't been initialized with pointers to valid memory blocks in the first place. If you want the array to be initialized to string literals you can do this.
I don't have any syntax error before this code, but yet after I wrote the definition line for the pointer array, I get the following one:
syntax error : missing ';' before 'type'
If the code that I posted is commented out, there are no compilation errors. What can possibly be wrong, especially now after I added the malloc code before each strcpy command. And the malloc allocates memory for each word separately into a new element of the array.