QUOTE(tonyho25 @ 11 May, 2008 - 03:03 PM)

I have an assignment due today and it involves arrays.
The assignment states to " add code to read 5 words from user input (cin). Store these values into an array of string[]. Make sure the string[] array is large enough to hold at least 6 values. Store the string constant "end_of_array" into the last element of the array. Using a do while () loop, print the 1st and 3rd letter (character) of each word (two letters per line) using the substring function.
I have my variable set to : char name[5];
my code is :
cout << "Enter five words with a minimum of six characters. \n Hit the return key when finished. " ;
cin >> name;
cout << name << endl;
It allows the user to enter five words using the space bar in between words and it p[rints the first word.
const string = end_of_array;
if that the correct way to do a const for end_of_array.
how to do the do...while() loop for the 1 and 3 characters. Please explain how you did it as well so I can actually understand. I am also not sure if my variable is correct because it is suppose to be a string[].