vector <char> englishWord[MAX_NUM_WORDS][MAX_WORD_LEN];
//Private class definition of vector
int wordCount = 0; // Function that compares the first vector to the other.
vector <char> engW[50]; //Error on the last line
dictionary(Dictionary);
for (int i = 0; i < strlen(s); i++)
{
char c = s[i];
if (c !=' '||'\t'||'\n'||','||'.')
{
engW[wordCount].push_back(c);
}
if (c == ' ')
{
wordCount + 1;
}
}
for (int i=0; i<numEntries; i++) //Looking up the words
{
if (englishWord[i] == engW[wordCount]) //Error
englishWord is a 2D array of vector<char>
engW is a 1D array of vector<char>
I think you're essentially comparing a vector<char> array to a vector<char>. I think your understanding of how vectors work is limited. Please read the documentation. http://en.cppreference.com/w/cpp/container/vector
I also advise you to use std::string instead of char.
Yeah, I would like to use string but my lecturer has seriously complicated our project by inserting a bit of code that forces us to use chars and we are not allowed to edit that bit of code.