#include #include #include "stackt.h" #include "stacke.h" using namespace std; void f(::stack *p); void g(::stack& r); int main() { ::stack s; stackt st(cout); stacke se; f(&s); f(&st); f(&se); cout << "\n"; g(s); g(st); g(se); return EXIT_SUCCESS; } void f(::stack *p) { p->push(10); cout << p->pop() << "\n"; } void g(::stack& r) //Exactly the same function, but with a reference argument. { r.push(20); cout << r.pop() << "\n"; }