Is it possible to return a stack to main? If so what is the proper way?
I have a simple function add that adds numbers to a stack, then I have a
and in main I have:Code:return mystack;
but this is not workingCode:stack <double> x; x = add(); cout << "stack has: " << x << endl;