#include #include #include using namespace std; int main() { stack> cstack; cstack.push(complex(3.14, 2.71)); cstack.push(complex(-3.14, -2.71)); while (cstack.size()) { cout << cstack.top().real() << ", " << cstack.top().imag() << "i" << '\n'; cstack.pop(); } } /* Generated output: -3.14, -2.71i 3.14, 2.71i */