I have a function to display the values of a vector in a table, but I keep getting an "Undefined symbols" error when linking.
Here is my function prototype:
void displayVectors(vector<string> & nameVec, vector<double> & scoreVec, vector<char> & gradeVec);
Here is the definition:
void dipslayVectors(vector<string> & nameVec, vector<double> & scoreVec, vector<char> & gradeVec) {
for (int i = 0; i < nameVec.size(); i++) {
cout << setw(12) << nameVec[i]
<< setw(8) << scoreVec[i]
<< setw(2) << gradeVec[i]
<< endl;
}
}
Here's where I called it:
displayVectors(nameVec, scoreVec, gradeVec);
I'm certain nameVec, scoreVec, and gradeVec are all the right types of vectors, and I have all the libraries included, so I'm stumped. I've seen other people on Google have problems with vectors like this, but they always found some error they made. Does anyone have any ideas?