title: Assignment makes pointer from integer without a cast and other questions
body: <p>I just started learning C a few days ago and I'm having a bit of difficulties with pointers. I'm trying to convert a string to an array of integers. The little snipet below seems to be working but I'm getting a warning : </p>
  
  <p>In function 'charToInt32' 
  warning: assignment makes pointer from integer without a cast [enabled by default]|
  ||=== Build finished: 0 errors, 1 warnings (0 minutes, 0 seconds) ===|</p>
  
  <p>The warning comes from the line </p>
  
  <pre><code>int32result[pos] = returnedInteger;
  </code></pre>
  
  <p>So I'm trying to understand what's the best solution. Should I use strncpy (but can I use strncpy for integers?) or something else or did I just completly misunderstand pointers?</p>
  
  <pre><code>    #include &lt;stdio.h&gt;
      #include &lt;stdlib.h&gt;
      #include &lt;string.h&gt;
  
  
      int charToInt32(char * clearText, unsigned int * int32result[])
      {
          int i = 0, j = 0, pos = 0;          /* Counters */
          int dec[4] = {24, 16, 8, 0};        /* Byte positions in an array*/
          unsigned int returnedInteger = 0;           /*   so we can change the order*/ 
  
          for (i=0; clearText[i]; i+=4) {
              returnedInteger = 0;
              for (j=0; j &lt;= 3 ; j++) {
                  returnedInteger |= (unsigned int) (clearText[i+j] &lt;&lt; dec[j]) ;
              }
  
              int32result[pos] = returnedInteger;
              pos++;
          }
          return pos;
      }
  
  
  
      int main()
      {
          int i = 0;
          unsigned int * int32result[1024] = {0};
          char * clearText =  "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
  
          printf("&gt;&gt;Clear: %s\n", clearText);
          charToInt32(clearText, int32result); // Do the conversion to int32.
          printf("&gt;&gt;Int32 converted: ");
          for (i=0; int32result[i]; i++)
              printf("%u ", (unsigned int) int32result[i]);
          printf("\n");
          return 0;
      }
  </code></pre>
  
  <p>Also, at the end of the program I have the following line:</p>
  
  <pre><code>printf("%u ", (unsigned int) int32result[i])
  </code></pre>
  
  <p>Casting int32result[i] to unsigned int is it the only solution to avoid another warning of using %u for an unsigned int * ?</p>
  
  <p>I did check the other "assignment makes integer from pointer without cast" topics/question but I could not quite get a final answer from them.</p>
  
  <p>Thank-you for your help.</p>