Array of words(strings)- please help!

This is a discussion on Array of words(strings)- please help! within the C++ Programming forums, part of the General Programming Boards category; Hi!
I want to create a simple program of arranging words in column. I found that this is like array. ...

Array of words(strings)- please help!

Hi!

I want to create a simple program of arranging words in column. I found that this is like array. I know array of characters whereby you define type as char, whereby array elements are characters, now how to declare array of words so that array elements are words?

You can use a 2D array of characters. ( char foo[ rows ][ cols ] )
You can use an array of pointers-to-char. ( char *foo[ SIZE ] )
You can use a pointer-to-pointer-to-char. ( char **foo )

You will have to use some dynamic memory allocation for the last two. You have to supply both sizes for the first one. And, since it turns out I somehow ended up on the C++ forum, you can use the actual string class.