int i;
char* names[7];
// declare array of pointers to charchar temp[16];
// read in 7 names and dynamically allocate storage for eachfor (i = 0; i < 7; i++)
{
cout << "Enter a name => ";
cin >> temp;
names[i] = new char[strlen(temp) + 1];
// copy the name to the newly allocated address
strcpy(names[i],temp);
}
// print out the namesfor (i = 0; i < 7; i ++)
cout << names[i] << endl;
// release the allocated memory for each namefor (i = 0; i < 7; i++)
delete [] names[i];