Hello,

I have a question about function parameter passing:

In my program, there is a pointer pointing to an image, say

CImage * pImage;

The program needs to call a function to do something.

void f( CImage * pImg );


What I want is that: if pImage is not null, function f(...) just uses it; if function f(...) finds pImg is null, it can load image and pass the pointer to image back to my program through a parameter. It seems that my above parameter passing can not do it.

Can anybody help me to solve the problem and how should I pass the parameters?

Thanks a lot!