Here is the code I have but it refuses to remove non letters,digits being read from a file line by line then each word in a line still what is wrong with it?
#include <iostream>
#include <fstream>
#include <string>
#include <sstream>
#include <algorithm>
#include <cctype>
#include <functional>
#include "BST.h"
using namespace std;
//Processword method
string processWord(string x)
{
// Removes all punctuation
x.erase(
std::remove_if(x.begin(), x.end(), &ispunct),
x.end());
//Remove all numbers
x.erase(
std::remove_if(x.begin(), x.end(), &isdigit),
x.end());
//Change all in string to uppercase
transform(x.begin(),x.end(),x.begin(),toupper);
//Remove all non letter characters and numbers
return x;
}