In the code above the else-if part gives me error. The meaning of else-if is: else if the value of x isn't in the deque then...
#include <iostream>
#include <ctime>
#include <stack>
#include <deque>
#include <algorithm>
deque<char> visited;
char x;
if (x==target[4][4])
{
visited.push_back(x);
return (visited);
}
else if (!(find(visited.begin(), visited.end(), x)))
{
visited.push_back(x);
}
ERROR:no operator "!" matches these operands