problems with 'free' in C
- by lego69
hello, can somebody please explain can I free const char* ?
I allocated new memory using malloc and when I'm trying to free it I always receive an error incompatible pointer type thanks in advance
something like this
char* name="Arnold";
const char* str=malloc(stlen(name)+1);
free(str); <- here bug