Answered step by step
Verified Expert Solution
Question
1 Approved Answer
1 down votefav I'm trying to implement a Deque using a doubly linked list. I included the header file that I made but I keep
1down votefav
I'm trying to implement a Deque using a doubly linked list. I included the header file that I made but I keep getting errors "identifier "DequeEmpty" is undefined" "identifier "DLinkedList" is undefined"
I don't understand what's the problem.
This is my code
#ifndef NOTATIONCONVERTER_H #define NOTATIONCONVERTER_H #include #include "NotationConverterInterface.hpp" typedef std::string Elem; // deque element type class LinkedDeque { // deque as doubly linked list public: LinkedDeque(); // constructor int size() const; // number of items in the deque bool empty() const; // is the deque empty? const Elem& front() const throw(DequeEmpty); // first element const Elem& back() const throw(DequeEmpty); // last element void insertFront(const Elem& e); // insert new first element void insertBack(const Elem& e); // insert new last element void removeFront() throw(DequeEmpty); // remove first element void removeBack() throw(DequeEmpty); // remove last element private: DLinkedList D; // doubly linked list of elements int n; // number of elements };
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started