title: C redirecting pointer
body: <p>I have some function that receives a pointer to a char[].</p>
  
  <pre><code>void foo(char *number, int size)
  {
    char tmp[size];
    for(i=0;i&lt;size;i++) //We look to see if the array number points to contains a 1
      tmp[i] = (number[i]=='1'?'1':'0');//if not then add a 0.
  
    *number = &amp;tmp; //PROBLEM LINE
  
    printMyPointer(number); //some function to print the contents of the array pointed to.
  }
  </code></pre>
  
  <p>But I am having the hardest time redirecting my pointer. I thought this example would read as "change pointer to this address". But I receive a compiler warning that "assignment makes integer from pointer without a cast [enabled by default]". How should I be redirecting my pointers?</p>