Need a little help with understanding arrays and functions. Say I have a simple function that uses a string array to allow a user to enter his name. My issue is how do I call up that function in main. Right now im just trying to run through the function, then just display what the 1st user entered for his name. Here is what I have.
void UserInput(string EmployeeName);
int main(){
UserInput(EmployeeName); //This is where my error is
cout << EmployeeName[0];
}
void UserInput(string EmployeeName){
int x = 0;
string EmployeeName[4];
for (x = 0; x < 5; x++){
cout << "Please Enter Employee First And Last Name. ";
cin >> EmployeeName[x];
cout << endl;
}
}