Hello, I keep getting errors saying "Invalid conversion from pointer to integer and I have tried both of the following operators * after the variable as well as & and nothing seems to work. All input is greatly appreciated. Thank you all for your time.
void Stack::print( )
{
StackPtr temp;
tosPtr = temp;
while(temp != NULL)
{
cout << elements -> temp;
}
if (isEmpty( ))
{
cout << "Stack is empty" << endl;
}
else
{
for (int k = tosPtr; k >= 0; k--)
{
cout << setw(5) << elements[k];
if (k == temp*)
cout << " <- top of stack";
cout << endl;
}
cout << "-----" << endl;
}
}