Alrighty, so I'm working on a piece of code for my CS class. I'm fairly new to this, and I'm making some mistake in trying to get this assignment together. Here is the code I'm using...

#include <iostream>
#include <cstring> // I am using the C++ strings library, not character arrays.

using namespace std;

void getName(string);
void giveName(string);

string namesArray[10];
int main(){
int getOption = 0;
int loopValue = 0;
int loopValue2 = 0;
do{
cout << "Please enter a 1 if you want to enter names, a 2 if you wish to find a name, or a 0 if you want to exit." << endl;
do{
cin >> getOption;
if (getOption == 0){
cout << "Goodbye." << endl;
return 0;
}
if (getOption < 0 || getOption > 2){
cout << "Please enter a valid selection." << endl;
loopValue2 = 0;
}
else{
if (getOption == 1){
getName(namesArray[10]);
loopValue2 = 1;
}
else{
giveName(namesArray[10]);
loopValue2 = 1;
}
}
}while(loopValue2 = 0);
} while(loopValue = 0);
}

void getName(string namesArray[]){
string firstName, lastName;
for(int i = 0; i < 10; i++){
cout << "When you are done entering names, please type exit for the next person's first name." << endl;
cout << "Please enter person number " << i++ << "'s first name." << endl;
cin >> firstName;
if (firstName == "exit"){
i = 10;
break;
}
cout << "Please enter person number " << i++ << "'s last name." << endl;
cin >> lastName;
lastName = " " + lastName;
namesArray[i] = firstName + lastName; // Concat to give the full name in 1 part of the array.
}
}
Albeit there are probably thousands of better ways to write this, I'm still new and learning. Now, my problem is in line 35(at the moment) in bold. I'm getting an error I don't know how to make sense of. It says..

"Undefined first referenced
symbol in file
giveName(std::basic_string<char, std::char_traits<char>, std::allocator<char> >)/var/tmp//ccyPQIEC.o
ld: fatal: Symbol referencing errors. No output written to a.out
collect2: ld returned 1 exit status"

I've tried passing the string array using nothing after namesArray, and it tells me that I can't do that by saying..

"error: conversion from `std::string*' to non-scalar type `std::string' requested"

Also, if I use namesArray[], I says...

"error: expected primary-expression before ']' token".

I am at a loss. Can anyone tell me where I am making my mistake(s)?