Remember that in C/C++, arguments are passed by value. Whatever you do to the argument within the function, it does not change the variable that was passed to it. That is why when we want to change a variable's value outside the function, we need to pass a pointer to that variable and dereference it within the function.
That is exactly what your program needs to do. As it now stands, you pass in a pointer to a Quantity. With that pointer, you can change the Quantity that it is pointing to. However, any changes you make to the pointer itself will only have an effect within the function itself and will not affect the pointer outside of the function.
For what you want to do, you need to pass a pointer to a pointer to a Quantity. Regard:
Code:
bool findVar(Quantity** poutVar, string nameString)
{
...
*poutVar = *wsiter; // point output to this quantity
...
Now you are able to change what the Quantity** is pointing to.
Of course, that is assuming that your usage of wsiter is correct.
BTW, I've worked with functions that required three or four levels of referencing (ie, 3 or 4 asterixes were needed).