What would be the equivalent of Stack.top().second and Stack.top().first

has the title stated what would be the equivalent of Stack.top().second and and Stack.top().first

Lua does not have a stack class implementation like C++ does, so you would need to write your own implementation. Stack.top() retrieves the element at the top and Stack.top().second only works if the element has a second method

1 Like

I know that Stacks are c++ things I am just asking for an equivalent for Lua because all I know is that Stacks are just tables