//: C06:Stack3.h
// From Thinking in C++, 2nd Edition
// Available at http://www.BruceEckel.com
// (c) Bruce Eckel 2000
// Copyright notice in Copyright.txt
// With constructors/destructors
#ifndef STACK3_H
#define STACK3_H
/* In questo esercizio si hanno:
Link(void*, Link*) = costruttore della struct
~Link() = distruttore della struct
Stack() = costruttore della classe
~Stack() = distruttore della classe */class Stack
{
struct Link
{
void* data;
Link* next;
Link(void* dat, Link* nxt);
~Link();}* head;
public:
Stack();
~Stack();
void push(void* dat);
void* peek();
void* pop();
};
#endif // STACK3_H ///:~