0
#include<iostream>
using namespace std;
const int namesize=21;
void getName(char,int);
void main()
{
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 5 names

2
Contributors
1
Reply
2
Views
10 Years
Discussion Span
Last Post by Ancient Dragon
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.