title: C request for member ***** in something not a structure or union
body: <p>I know there are some posts just like this one, but all solutions on those posts didn't help me, and they tended to just say switching l.valor to l->valor, and that is not working in my case, and I don't understand why.</p>
  
  <p>This is what I have:</p>
  
  <pre><code>typedef struct lligada {
      int valor;
      struct lligada *prox;
  } *LInt;
  
  void insertOrd (LInt *g, int x){
      if (g != NULL) g-&gt;valor = x;
  }
  </code></pre>
  
  <p>And I am getting this:</p>
  
  <pre><code>error: request for member 'valor' in something not a structure or union if (g == NULL) g-&gt;valor = x;
  </code></pre>
  
  <p>What am I doing wrong?</p>
  
  <p>PS: This is an exercise on a platform called codeboard, it is homework, I can't change the struct declaration, nor can I change the arguments of the function insertOrd, I have to use what I get on insertOrd and make the function work</p>