#include<
iostream>
using namespace std;
constacode]nt namesize=21;
void getName(char,int);
intmain()
{
int index=5;
int count;
char names[21];
char *aString=names;
for(count=0;count<index;count++)
{
char names;
getName(*aString,index);
cout << "You entered: ";
cout << &names;
}
}
void getName (char names[][21], int index)
{
cout << "enter a name: ";
cin >> names[index];
}
I need to enter five names with 21 charcters