Is there a preferred pattern for defining throwaway variables in C++ to pass to functions which take arguments by reference? One example of this is in using openCV's minmaxLoc function:
void minMaxLoc(const Mat& src, double* minVal, double* maxVal=0, Point* minLoc=0, Point* maxLoc=0, const Mat& mask=Mat())
The function changes the value of minVal, maxVal, minLoc, maxLoc to correspond to the min/max intensity values and locations.
I could declare dummy variables for all of the parameters, but I really only need maxLoc. Is there a preferred C++ pattern such that I only declare maxLoc and don't clutter up my code with extra declarations of variables that I'm defining for the sake of calling minMaxLoc()?