title: warning: assignment makes pointer from integer without a cast [-Wint-conversion] in C program
body: <p>I can not solve this problem: warning: assignment makes pointer from integer without a cast [-Wint-conversion] -> auxcandidate = alpha[pos]</p>
  
  <p>Here's my code:</p>
  
  <pre><code>char* getkey(int minimo, int maximo, int alphalen, int index, char alpha[]);   
  int main()  
      {  
          int minimo = 2;
          int maximo = 2;
          char *alpha = "abc";
          int alphalen = strlen(alpha);
  
          char *candidata;
  
          printf("La candidata es: ");
          candidata = getkey(minimo, maximo, alphalen, 5, alpha);
          //printf(" %c", candidata); 
          //if (candidata = "bc")
          //{}
          return 0; 
      }
  
      char* getkey (int minimo, int maximo, int alphalen, int index, char alpha[])  
      {  
          int cociente, residuo, cont;
          int i = 0;
          char cand[maximo+1];
  
          char* auxcandidate;
  
          while (index != 0)
          {
              cociente = index / alphalen;
              residuo = index%alphalen;
              cand[i] = residuo;
              index = cociente;
              i+=1;
          }
  
          for (cont=i-1; cont&gt;=0; cont--)  
          {   
              int pos = cand [cont];
              auxcandidate = alpha[pos];      
          }
          return auxcandidate;
      }
  </code></pre>
  
  <p>Can someone explain these warning?</p>