I'm trying to just use a normal stack and have it pop the numbers in the order stacks normally go but it just keeps popping 28 (or at least from output thats what i see) it should just be pretty straight forward but ....
#include <iostream>
#include <stack>
using namespace std;
int main()
{
stack<int> number;
int x=0;
number.push(43);
number.push(34);
number.push(45);
number.push(28);
x=number.top();
while(!number.empty()){
number.pop();
cout<<x;
}
return 0;
}