Hi all, I'm working on my first project and feel some confusing, please advice me, very appreciate.

here is the problem:

Write a program to do the following:
1. Input a series of string into an array. Let the user specify how many strings are to be input.
2. Write a function to return the number of vowels in a string.
3. Output each word of a string on a separate line. Assume that the words are separated by a single blank with a period at the end of the string.

And here is my work. It look like I make the #2 and #3 but blind in #1.

#include <iostream>
#include <fstream> // For file I/O
#include <string> // For string class
#define MAXLEN 50


using namespace std;

int nstr; // the number of string
int PrintString(char*);
int CountVowel(char*);

int main ()
{


char string[MAXLEN];

cout << "Enter the sentence:"<< endl;

cin.getline(string,MAXLEN);
cout << "The sentence '" << string << "' has " << CountVowel(string) <<" vowels." << endl;
cout << "The words are: "<<endl;
cout << PrintString(string) <<endl;

return 0;
}

//countwovel function count the number of vowels in each string

int CountVowel(char* str)
{
int nCount = 0;

for(int i=0; str[i] != '\0'; ++i)
{
if( str[i]=='A'|| str[i]=='a'
|| str[i]=='E'|| str[i]=='e'
|| str[i]=='I'|| str[i]=='i'
|| str[i]=='O'|| str[i]=='o'
|| str[i]=='U'|| str[i]=='u')
++nCount;
}
return nCount;
}

//This function print out the individual words of the string on each line


int PrintString(char* str)
{
int nPrint = 0;

for( int j=0; str[j] !='\0';++j)
if (str[j]!=' ')
cout<<str[j];
else if (str[j]==' ')
cout<<endl;

return nPrint;
}