I have fairly decent C++ skills, but this one cast has been giving me issues. I have a function that takes in the following parameters: (volatile void **, void * , void*)
. I have 3 int*
variables and I am trying to pass them in as (&var1, var2, var3)
. However, I am getting the following error: Cannot convert parameter 1 from int** to volatile void**
. Is there a specific cast that needs to be made to allow for this? Below is a snippet of code that I am using. Any help is greatly appreciated.
int* pVal = InterlockedCompareExchangePointer(&cur_val, new_val, old_val);
This is being done in VS2010 on a windows XP machine.