Hello, this could be a stupid question, but I don't know the answer...a short example explains more than many words:
char* function(){
char *str;
str=(char *)MallocSafe(SIZE);
return str;
}
void main(){
char *buffer;
buffer=function();
}
In this case, will the value of the pointer "buffer" be the same of "str"? In other words, will the memory allocated and pointed to by str be accessible again outside?
I'd like to get a technical answer to understand the behavior of the compiler and linker in this case, thanks for help.
BrownB