well, I guess I'm just used to cast to (char *), from all the books and examples I've ever read.Originally Posted by kermit
But I understand that it's not really necessary with C, but to C++ which is more restrictive with casting.
One last question, lately I've been looking into memory leaks, and I understand that it's important to free allocated memory; But what if I don't allocate memory with a function like malloc(), but simply do:I know I can't free this kind of string myself, but can I really trust the OS to do it on it's own?Code:char str;
If so, why do I need to allocate manually any way?
Thank again for all your help