I am trying to populate a vector of strings and then remove any duplicates within that vector. Here is what I have so far. I am getting an error saying: Error 2 error C2064: term does not evaluate to a function taking 2 arguments
.
void removeDup() {
vector <string> list;
ifstream inputFile;
inputFile.open("database.txt");
string myString;
int count;
if(inputFile.is_open()) {
while(!inputFile.eof()) {
getline(inputFile, myString);
list.push_back(myString);
}
std::sort(list.begin(), list.end());
list.erase(std::unique(list.begin(), list.end(), list.end()));
inputFile.close();
}