Instead of creating a
struct
containing two arrays, create a
struct
that contains a name and a number, then create an array of those:
typedef struct _Person
{
char Name[100];
char CellNumber[14];
} Person;
Person people[10];
int main()
{
...
for (int i = 0; i < 9; i++)
{
cin >> people[i].Name;
cin >> people[i].CellNumber;
}
...
}