title: Freeing memory for const char * variable in C++
body: <p>I have a variable declared as const char *. I have allocated memory for that using malloc(). After using it, I want to free that memory using free(). But I am not able to do that and it gives me error that "Attempting to write to protected memory". How do I free the memory allocated?</p>
  
  <p>Thanks,
  Rakesh.</p>