“Invalid operands to binary expressions” Error
<p>I keep getting this error:</p>

<blockquote>
  <p>Invalid operands to binary expressions ('struct node'and 'int')</p>
</blockquote>

<p>on two lines that I've marked below with ** in the function "reachR". Whats wrong and how can I fix it? The code is for a data structure assignment.</p>

<pre><code>#include &lt;stdio.h&gt;
#include &lt;stdlib.h&gt;
#define Vertex int
#define maxV 10000

typedef struct digraph *Digraph;
typedef struct node *teste;
static int lbl[maxV];

typedef struct {
    Vertex v, w;
} Arc;

struct digraph {
    int V;
    int A;
    teste *adj;
};

struct node {
    Vertex w;
    teste next;
};


teste NEWnode( Vertex w, teste next) {
    teste a = malloc( sizeof (struct node));
    a-&gt;w = w;
    a-&gt;next = next;
    return a;
}

Arc ARC( Vertex v, Vertex w) {
    Arc a;
    a.v = v, a.w = w;
    return a;
}

void reachR( Digraph G, Vertex v) {
    Vertex w;
    lbl[v] = 1;
    for (w = 0; w &lt; G-&gt;V; w++)
        **if (G-&gt;adj[v][w] == 1 &amp;&amp; lbl[w] == 0)**
            reachR( G, w);
}

int DIGRAPHreach( Digraph G, Vertex s, Vertex t) {
    Vertex v;
    for (v = 0; v &lt; G-&gt;V; v++)
        lbl[v] = 0;
    reachR( G, s);
    if (lbl[t] == 0) return 0;
    else return 1;
}

int digraphcycle( Digraph G) {
    Vertex v; teste a; int output;
    for (v = 0; v &lt; G-&gt;V; v++)
        for (a = G-&gt;adj[v]; a != NULL; a = a-&gt;next) {
            output = DIGRAPHreach( G, a-&gt;w, v);
            if (output == 1) return 1;
        }
    return 0;
}

Digraph DIGRAPHinit( int V) {
    Vertex v;
    Digraph G = malloc( sizeof *G);
    G-&gt;V = V;
    G-&gt;A = 0;
    G-&gt;adj = malloc( V * sizeof (teste));
    for (v = 0; v &lt; V; v++)
        G-&gt;adj[v] = NULL;
    return G;
}

void DIGRAPHinsertA( Digraph G, Vertex v, Vertex w) {
    teste a;
    for (a = G-&gt;adj[v]; a != NULL; a = a-&gt;next)
        if (a-&gt;w == w) return;
    G-&gt;adj[v] = NEWnode( w, G-&gt;adj[v]);
    G-&gt;A++;
}

int main (){
    Digraph G = DIGRAPHinit(4);
    DIGRAPHinsertA(G, 1, 2);
    DIGRAPHinsertA(G, 1, 3);
    DIGRAPHinsertA(G, 2, 3);
    DIGRAPHinsertA(G, 3, 4);
    if (digraphcycle(G)==1){ 
        printf("SIM!"); 
    } 
}
</code></pre>