Example #1
0
void Test3()
{
	StackWithMin<int> min;
	min.Push(1);
	min.Push(2);
	min.Push(1);
	cout << min.Min() << endl;
	min.Pop();
	cout << min.Min() << endl;
}
Example #2
0
void Test2()
{
	StackWithMin<int> min;
	min.Push(1);
	min.Pop();
	min.Push(1);
	min.Min();
	cout << min.Top() << endl;
	if (!min.Empty())
	{
		cout << "pass" << endl;
	}
	else
	{
		cout << "false" << endl;
	}

}