Changing pointer inside function?
Hey, probably a simple question for some of you...
I need to pass an NULL pointer to a function and have the pointer be given a value within the function. How would that be done? Can a pointer be passed as reference?
My code would look something like this:
But this is not changing the value of the NULL pointer for me after the function exits...
void GetData(DataType *data)
data = (DataType *) FunctionThatReturnsPointer();
DataType *data = NULL;