#include<iostream>
#include<string>
#include<stack>
#include<cstddef>
usingnamespace std;
typedef string ItemType;
class Stack {
public:
// Creates an empty stack.
Stack();
bool empty() const; // declared like this in the text book
//defined like this:
bool Stack::empty() const
{
return (head == NULL);
}
#include<iostream>
#include<string>
#include<stack>
#include<cstddef>
usingnamespace std;
typedef string ItemType;
class Stack {
public:
// Creates an empty stack.
Stack();
bool empty() const; // declared like this in the text book
}; // Note
//defined like this:
bool Stack::empty() const // This function should be in .cpp file
{
return (head == NULL);
}
#include<iostream>
#include<string>
#include<stack>
#include<cstddef>
usingnamespace std;
typedef string ItemType;
class Stack {
public:
// Creates an empty stack.
Stack();
//bool empty() const; // declared like this in the text book
//defined like this:
boolStack::empty() const
{
return (head == NULL);
}
}; // Note