It looks like you forgot to include your header file.
Try adding this to the top of your script--
#include "templateq.h"
Edit: Hmm interesting, I made the following changes and it managed to work--
//templateq.h
#ifndef TEMPLATEQ_H
#define TEMPLATEQ_H
#include <iostream>
#include <new>
#include <cstddef>
using namespace std;
class FullTemplateQ // Exception class
{};
class EmptyTemplateQ // Exception class
{};
template<class SomeType> // Node template class
struct QueueNode
{
SomeType data; // Data stored in queue node
QueueNode<SomeType>* nextPtr; // Pointer to next queue node
};
template<class SomeType> // Circular queue template class
class TemplateQ
{
private:
QueueNode<SomeType>* rearPtr; // Pointer to rear of queue
QueueNode<SomeType>* frontPtr; // Pointer to front of queue
void PrintNext(QueueNode<SomeType>* tempPtr) const; // Print trailing items
public:
TemplateQ(); // Default constructor
~TemplateQ(); // Destructor deallocates every node
void Enqueue(SomeType newData); // Adds newdata node to rear of queue
SomeType Dequeue(); // Removes data node from front of queue,
// returning the stored data
bool IsFull() const; // Returns true if queue is full,
// false otherwise
bool IsEmpty() const; // Returns true if queue is empty,
// false otherwise
int Size() const; // Returns the number of items in queue
void ForwardPrint() const; // Prints queue, front to rear
void ReversePrint() const; // Prints queue, rear to front
};
//#include "templateq.cpp" // Very Important!! Do not delete!!
#endif
Notice I commented out the #include for templateq.cpp.
// templateq.cpp
#include "templateq.h"
#include <new>
#include <cstddef>
using namespace std;
template <class someType>
TemplateQ<someType>::TemplateQ() …