Comparison operator "no match" error
<p>I have searched the site for something similar, however the other posts on "no match for operator" errors do not help in my situation.</p>

<p>I have a struct node in the beginning, and then the following piece of code:</p>

<p>Function end() returns a type node. Therefore the statement op != end(OPEN) should resolve just fine, however I am getting the error: no match for 'operator!=' in '*op != end(OPEN)'</p>

<p>I am using G++ compiler. Does anyone know what I am doing wrong? I have been trying just about anything for hours... Thanks</p>

<pre><code>typedef struct node {   
bool h1;
bool w1;
bool h2;
bool w2;
bool h3;
bool w3;
bool b;

int operation;
int iterator;

node *parent;};

node end ( list l ) {
node *n;

return *n;}

bool exists ( node *s, list OPEN, list CLOSED ){
node op;
node cl;
op = begin(OPEN);
cl = begin(CLOSED);
int x;

for(; op != end(OPEN); x++)
{
    if( (*(*op)) == (*s) )
    {
        break;
    }
}
</code></pre>
