Why memset function doesn't work? : <p>Why memset function doesn't work inside c++ function with char pointers?</p>

<pre><code>void change(char* input){
  memset(input, 'a', strlen(input));
}

int main(){
  char* p = "foo";
  cout &lt;&lt; p &lt;&lt; endl;
  change(p);
  cout &lt;&lt; p &lt;&lt; endl;
}
</code></pre>
